Operating System - Linux
1819794 Members
3385 Online
109607 Solutions
New Discussion юеВ

SNMP howto configure /etc/snmp/snmpd.local.conf

 
'chris'
Super Advisor

SNMP howto configure /etc/snmp/snmpd.local.conf

hallo

I'd like to get network interface statistics
via cacti (rrdtool) network from my public webserver
running on Debian Sarge Stable.
I've installed snmpd and changed already
in /etc/snmp/snmd.conf the following entry to:

com2sec readonly default myprivate

but if I start snmpwalk, then I get following message:

# snmpwalk -v 1 -c myprivate localhost system
SNMPv2-MIB::sysContact.0 = STRING: Root (configure /etc/snmp/snmpd.local.conf)
SNMPv2-MIB::sysName.0 = STRING: ext.undostres.ch
SNMPv2-MIB::sysLocation.0 = STRING: Unknown (configure /etc/snmp/snmpd.local.conf)

I've created a file /etc/snmp/snmpd.local.conf ,
but really don't know what should I put inside ?

for a security reason I'd like to allow snmp only from/to localhost.

kind regards
chris

4 REPLIES 4
Steven E. Protter
Exalted Contributor

Re: SNMP howto configure /etc/snmp/snmpd.local.conf

Shalom Chris,

One comment, if you allow snmp from only local host, you may be defeating the purpose of snmp, which is to monitor this host from another machine and know when its up and down.

I would suggest also allowing access to your snmp monitor machine.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Jeroen Peereboom
Honored Contributor

Re: SNMP howto configure /etc/snmp/snmpd.local.conf

The snmpd.conf also contains lines with values for sysName, sysLocation etcetera.
You should modify these values.

I don't think you need snmpd.local.conf.
What kind of snmpd package did you install?
I have net-snmp-5.0... and no snmpd.local.conf.

Will cacti work if you only allow local snmpwalks?

JP.
'chris'
Super Advisor

Re: SNMP howto configure /etc/snmp/snmpd.local.conf

# snmpd -v

NET-SNMP version: 5.1.2
Web: http://www.net-snmp.org/
Email: net-snmp-coders@lists.sourceforge.net

yes cacti is working,
but howto allow snmp only to the localhost, because this is only one external machine.
Sergejs Svitnevs
Honored Contributor

Re: SNMP howto configure /etc/snmp/snmpd.local.conf

Debian has its own way of installing snmp daemon.

1) Install snmpd package (apt-get install snmpd)

2) Configure snmpd settings in /etc/snmp/snmpd.conf

3) Restart snmpd with new settings "/etc/init.d/snmpd reload"

4) Enable snmpd in /etc/hosts.allow "snmpd:

5. Enjoy

Regards,
Sergejs