Allow incoming/outgoing SNMP traffic in IPTables

Allow outgoing SNMP traffic in IPTables

iptables -A INPUT -i eth0 -p udp -s--sport 161:162 -d
--dport 1024:65535 -m state --state ESTABLISHED -j ACCEPT

iptables -A OUTPUT -p udp -s --sport 1024:65535 -d
--dport 161:162 -m state --state NEW,ESTABLISHED -j ACCEPT

Allow incoming SNMP traffic in IPTables

iptables -A INPUT -i eth0 -p udp -s 152.102.124.31 --dport 161:162 -j ACCEPT
iptables -A OUTPUT -p udp -d 152.102.124.31 --dport 1024:65535 -j ACCEPT