I installed snmp on CentOS 7.2, like so:yum -y install net-snmp net-snmp-utilsI made a backup of my snmpd.conf file: cp /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.origthen I cleared the text, with this:echo  > /etc/snmp/snmpd.confand added to the snmpd.conf, the following:rocommunity #random$ monitoring_server_ipThe monitoring_server_ip is the server that that is allowed to connect to this snmpd server.Restarted snmpd/bin/systemctl restart snmpdWhen I run snmpwalk on my CentOS 7.2 serversnmpwalk -v2c -c public localhost systemI then get:Timeout: No Response from localhostWhich is accurate, because there is only one IP-adres that can do that, as we have defined before.ps shows that snmp is running/usr/sbin/snmpd -LS0-6d -fThis is my first time playing with snmp and any help is greatly appreciated!output of iptables -L -n | grep udp shows this:...Chain IN_public_allow (1 references)   94  target     prot opt source               destination   95  ACCEPT     udp  --  XX.XXX.XXX.XXX        0.0.0.0/0            udp dpt:161 ctstate NEW...All of the destination was too 0.0.0.0/0?Netstat shows the following port: netstat -ulnp | grep 161udp        0      0 0.0.0.0:161             0.0.0.0:*                           19062/snmpdalso this:netstat -lu | grep snmpudp        0      0 0.0.0.0:snmp            0.0.0.0:*Also, in my firewall, added that only one IP-adres can access my snmp server:firewall-cmd --permanent --zone=public --add-rich-rule=rule family=ipv4 source address=XX.XXX.XXX.XX port protocol=udp port=161 accept
How to properly configure snmpd?
centos;snmp
The com2sec security model is not mandatory anymore.In snmpd.conf it should be enough to do:rocommunity #randomsometinh$  2.2.2.2where 2.2.2.2 is the monitoring IP address allowed to connect.I often prefer to assign a single IP, than giving access to a whole /24. So this configuration means the SNMP service will answer requests from the 2.2.2.2 address.You might also have to comment the line that restricts the snmpd daemon to the localhost for security reasons. # agentAddress  udp:127.0.0.1:161After changing the configuration file, do:service restart snmpdTo confirm if it is listening locally: $ netstat -lu | grep snmpudp        0      0 *:snmp                  *:* And from the allowed network/IP, for walking the entire MIB tree. Assuming 2.2.2.1 is the machine being monitored:snmpwalk -c #randomsometinh$ -v2c 2.2.2.1or for asking for the sysUpTime OID:snmpwalk -c #randomsometinh$ -v2c 2.2.2.1 1.3.6.1.2.1.1.3snmpget -c #randomsometinh$ -v2c 2.2.2.1 1.3.6.1.2.1.1.3.0snmpget has to have the 0 for the specific object instance/index.P.S: 2.2.2.2 is the monitoring server, and 2.2.2.1 is the snmpd server/host to be monitored.