1

how could I configure it, to work with my hostname, my ip, my domainName

snmpwalk -v 1 -c public localhost .1.3.6.1.2.1

works

snmpwalk -v 1 -c public myPCname or myIP .1.3.6.1.2.1

doesn't work: Timeout: No Response from myPCname or myIP

7
  • 1
    Does ping work with myPCname?
    – Keith
    May 21, 2012 at 15:53
  • In addition to Keith's question, can you even ping the IP?
    – MaQleod
    May 21, 2012 at 16:02
  • ping myPC PING myPC.somewhere.co (138.111.111.1110) 56(84) bytes of data. 64 bytes frommyPC.somewhere.co (138.111.111.111): icmp_seq=1 ttl=64 time=0.032 ms and same for ping 138.111.111.111, it's my IP's from ifconfig, edit: It's maybe due to firewall
    – caub
    May 21, 2012 at 16:18
  • well no the ports 161 are added in the firewall for udp, and even, locally it should have worked, so I have no idea, I have already uninstalled snmpd and reinstalled it.
    – caub
    May 21, 2012 at 16:20
  • 1
    What snmp-server is this?
    – Paul
    May 22, 2012 at 4:04

3 Answers 3

1

Do you have the agent configured to respond to SNMP queries externally?

Edit /etc/snmp/snmpd.conf and see if under ACCESS CONTROL you have community and trees allowed that would apply for external access, check this for details

You now probably have rocommunity public localhost (hence localhost works) but then another directive with rocommunity communitysecret default -V systemonly, try commenting this one out.

Try adding a line with rocommunity communitystring default Then

snmpwalk -v 1 -c communitystring myPCname or myIP .1.3.6.1.2.1

Then restart snmpd

/etc/init.d/snmpd restart

1

Maybe you have problem with the community name check that and try again with this tool snmp tool

0

Another possibility is that the line : agentaddress localhost:161 is in /etc/snmp/snmpd.conf which causes snmpd listen only on the local address. Remove it and it will be listening on all interfaces.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .