IPTables SNMP

See bold lines (192.168.1.9/32 is my monitor):

nano /etc/sysconfig/iptables

# Generated by iptables-save v1.4.7 on Thu Jun 14 14:51:55 2012
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [1842:173072]
-A INPUT -m state –state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state –state NEW -m tcp –dport 22 -j ACCEPT
-A INPUT -p udp -m udp -s 192.168.1.9/32 –dport 161:162 -j ACCEPT
-A INPUT -j REJECT –reject-with icmp-host-prohibited
-A FORWARD -j REJECT –reject-with icmp-host-prohibited
COMMIT
# Completed on Thu Jun 14 14:51:55 2012

service iptables restart

Author: Thomas Faddegon

Do you like my posts and want to do something back? You can buy me a beer :)