Hello,
I have the following very, very basic configuration in my snmpd.conf file on a CentOs 6.5 box. It is a copy of the config from a SuSE box on the same subnet that is known working.
Code:
rocommunity publiccomm 10.20.20.0/24
rocommunity publiccomm 127.0.0.0/8
rwcommunity supersecret 10.20.20.0/24
I installed snmp with "yum install net-snmp net-snmp-utils"
When running "snmpwalk -v 1 -c publiccomm localhost" it dumps all the MIBs as expected. If I replace localhost with the IP address of the system, 10.20.20.41, it times out and doesn't respond. I can't figure out what is going on. netstat shows that snmpd is listening 0.0.0.0:161, and just in case, I added firewall rules at the very top of the iptables config:
Code:
iptables -I INPUT -p tcp --dport 161 -j ACCEPT
iptables -I INPUT -p udp --dport 161 -j ACCEPT
I've run into this problem in the past on Ubuntu hosts. The solution was to remove the 127.0.0.1 from the /etc/default/snmpd configuration file. The problem I am having is that CentOS doesn't seem to have an equivalent file. There is a file in /etc/sysconfig but everything is commented in that file. I checked the /etc/init.d/snmpd file and confirmed that it doesn't have localhost or 127.0.0.1 specified in the parameters passed into the snmpd executable either. I've checked SELinux and set it to permissive to see if that was the problem, but it also didn't solve the issue. I'm running out of things to try to solve this issue. Once I get it working locally, it should be a breeze to get it to listen for remote connections so Cacti can monitor it.
Can anyone point out what I am doing wrong?
Thanks