SNMP responding only to local queries...

August 30, 2010 at 00:11:18
Specs: Linux
I have installed Net-SNMP on a Linux machine.
It is binded to port udp 161
I start it with the command: snmpd -Lo
when I do
snmpget -v 1 -c public localhost system.sysObjectID.0
on the same machine the snmpd is running on- I get a respond
SNMPv2-MIB::sysObjectID.0 = OID: ccitt.1
when I send same request from another (Windows) machine (using SNMPc program) - I see no reaction.
I used "wireshark" to monitor packets, and I see the requests sent from the other machine. I also see them get to the first machine.
Do you have an idea why isn't it working?

just do you will have more details:
10:01:50[net-snmp-5.5]<169> netstat -an | grep 161
udp 0 0 0.0.0.0:161 0.0.0.0:*

10:01:50[net-snmp-5.5]<170> ps ax | grep snmp
26058 ? S 0:00 ./sbin/snmpd -Lo


See More: SNMP responding only to local queries...

Report •

#1
August 30, 2010 at 06:58:51
more info:
--------------

1. I checked again, and no firewall is enabled

2. when using "iptables" command I see no rules at all (empty table), which means, as far as I understand, that no filter is performed. which is good... :-)

3. I ran snmpd with -f -Lo -d flags to debug packet traffic and I have noticed that except from request-ID, there is no differance between the 2 requests the snmpd gets - and still, it only answer the local one:

Received 42 bytes from UDP: [172.26.9.5]:58633->[172.26.20.200]
0000: 30 28 02 01 00 04 06 70 75 62 6C 69 63 A0 1B 02 0(.....public...
0016: 03 00 DD 54 02 01 00 02 01 00 30 0E 30 0C 06 08 ...T......0.0...
0032: 2B 06 01 02 01 01 02 00 05 00 +.........

Received SNMP packet(s) from UDP: [172.26.9.5]:58633->[172.26.20.200]
GET message
-- SNMPv2-MIB::sysObjectID.0


Received 43 bytes from UDP: [127.0.0.1]:46183->[127.0.0.1]
0000: 30 29 02 01 00 04 06 70 75 62 6C 69 63 A0 1C 02 0).....public...
0016: 04 16 CC AA 2E 02 01 00 02 01 00 30 0E 30 0C 06 ...........0.0..
0032: 08 2B 06 01 02 01 01 02 00 05 00 .+.........

Received SNMP packet(s) from UDP: [127.0.0.1]:46183->[127.0.0.1]
GET message
-- SNMPv2-MIB::sysObjectID.0

Sending 44 bytes to UDP: [127.0.0.1]:46183->[127.0.0.1]
0000: 30 2A 02 01 00 04 06 70 75 62 6C 69 63 A2 1D 02 0*.....public...
0016: 04 16 CC AA 2E 02 01 00 02 01 00 30 0F 30 0D 06 ...........0.0..
0032: 08 2B 06 01 02 01 01 02 00 06 01 01 .+..........


Report •
Related Solutions


Ask Question