Step # 8 Block ports 161 & 162 at the firewall level

You do not want to give access to everyone to your snmp server for security reasons. SNMP server uses UDP port # 161 and 162 for communication. Use Linux IPTABLES firewall command to restrict access to your SNMP server.

(a) Allow outgoing SNMP server request from your Linux computer. This is useful when you query remote host/router (replace SERVER IO with your real IP):

(b )Allow incoming SNMP client request via iptables. This is useful when you wish to accept queries for rest of the world (replace SERVER IP with your real IP):

Pleae note that above two are just SNMP specific iptables rules. Please consult iptables(8) man page or our CentOS / Redhat Iptables Firewall Configuration Tutorial for complete information on iptables.