LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-13-2007, 05:46 PM   #1
kelo81
LQ Newbie
 
Registered: Oct 2005
Posts: 10

Rep: Reputation: 0
Smile Problem with remote Net-SNMP access


Hello everybody. I'm having a problem with SNMP remote access. I'm working with Debian Etch, and I configured the snmpd.conf file to work remotely with a public comunity.

The code of the file looks like this:

------------------------------------------
com2sec local 127.0.0.1/32 Cl4v3-d3-Acc3s0
com2sec localnetwork 192.168.1.0/24 Cl4v3-d3-Acc3s0

group MyRWGroup v1 local
group MyRWGroup v2c local
group MyRWGroup usm local

group MyROGroup v1 localnetwork
group MyROGroup v2c localnetwork
group MyROGroup usm localnetwork

## name incl/excl subtree mask(optional)

view all included .1 80

## group context sec.model sec.level prefix read write notif

access MyROGroup "" any noauth exact all none none
access MyRWGroup "" any noauth exact all all all


syslocation Server TECHSERVER
------------------------------------------

So, if I run in the local system the following command it runs OK:

snmpwalk -v 1 127.0.0.1 -c Cl4v3-d3-Acc3s0 system

I get the variables without problem. However, if I try to use the IP of the network interface (eth1), then it returns a timeout message:

snmpwalk -v 1 192.168.1.23 -c Cl4v3-d3-Acc3s0 system

Timeout: No Response from 192.168.1.23

The LAN configuration seems to be OK, as I have several services running in the server, and all of them are working fine.
Is there any other parameter to add in the snmpd.conf file?

Thanks in advance!
 
Old 12-15-2007, 02:52 AM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
And you're certain there's no firewall between the device and your agent?
 
Old 12-15-2007, 10:28 AM   #3
kelo81
LQ Newbie
 
Registered: Oct 2005
Posts: 10

Original Poster
Rep: Reputation: 0
Question

Quote:
Originally Posted by paulsm4 View Post
And you're certain there's no firewall between the device and your agent?
Hello, thanks for your answer.
No, there is no firewall, the strange thing is that it doesn't work even if I run the command "snmpwalk -v 1 192.168.1.23 -c Cl4v3-d3-Acc3s0 system" in the local system; It returns timeout (the same command works with 127.0.0.1). But any other command using the public IP (like a ping, or a MySQL connection) from the network or from the local system works ok.

so... any idea?
 
Old 12-15-2007, 01:18 PM   #4
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

I'm prepared to be wrong ... but is it possible that any firewall (even a software firewall running locally) might be preventing the SNMP communication?

If you have a firewall (especially one on the Linux server you're trying to query), temporarily disable it and see if it makes a difference.

Just a suggestion .. PSM

PS:
Other troubleshooting suggestions:
- Consider temporarily using "public"
<= Eliminate possible SNMP security/security configuration issues
- Enable logging
<= Most SNMP agents support some kind of logging/tracing
- Take an Ethereal trace
<= Examine the SNMP packets being sent between the agent and the monitor
- Look at your system log
<= Be sure to look at any firewall/network related logs, too!
- Etc etc

Last edited by paulsm4; 12-15-2007 at 04:58 PM.
 
Old 01-01-2008, 04:20 PM   #5
svancouw
LQ Newbie
 
Registered: Oct 2006
Location: California
Distribution: Debian Etch
Posts: 9

Rep: Reputation: 0
Kelo, I just went through this on my debian Etch systems. It turns out that the default configuration of snmpd is to only listen on 127.0.0.1

The way to solve this is to replace 127.0.0.1 with the IP of your system, and the config file for this is in /etc/default/snmpd, in snmpd options (SNMPDOPS) towards the top.

Restart the snmp service, and your system should now respond to queries.

BTW, thanks for the config file


Happy New Year!

Last edited by svancouw; 01-01-2008 at 04:21 PM. Reason: added info
 
Old 01-16-2008, 10:53 AM   #6
kelo81
LQ Newbie
 
Registered: Oct 2005
Posts: 10

Original Poster
Rep: Reputation: 0
Smile

Quote:
Originally Posted by svancouw View Post
Kelo, I just went through this on my debian Etch systems. It turns out that the default configuration of snmpd is to only listen on 127.0.0.1

The way to solve this is to replace 127.0.0.1 with the IP of your system, and the config file for this is in /etc/default/snmpd, in snmpd options (SNMPDOPS) towards the top.

Restart the snmp service, and your system should now respond to queries.

BTW, thanks for the config file


Happy New Year!
Hello, thank you for your research!, I made the change and it is working OK now!.

Thank you again!

Regards

Kelo.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with net-snmp aspenbr Linux - Networking 4 08-07-2012 02:46 PM
Problem with net-snmp and web server 81bones Linux - Server 0 07-05-2007 08:24 PM
net-snmp subagent problem watsonpan Linux - Software 0 09-21-2005 02:30 AM
problem in installing net-snmp anubhuti_k Linux - Networking 1 02-03-2005 01:49 PM
snmp (ucd-snmp, net-snmp) markus1982 Linux - Software 1 11-21-2002 11:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration