SNMP

From Edgar BV Wiki
Revision as of 12:18, 5 July 2019 by Red (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

apt-get install snmp-mibs-downloader


/etc/snmp/snmpd.conf should have at least the following:

#  Listen for connections from the local system only
#agentAddress  udp:127.0.0.1:161
#  Listen for connections on all interfaces (both IPv4 *and* IPv6)
agentAddress udp:161,udp6:[::1]:161

in order to allow the daemon to listen to all IP adresses instead of only localhost (nb you can't bind to an IP address that the machine doesn't have here!)


Also (for v1) community names should be changed from 'public' to 'whatever'

rocommunity public  default    -V systemonly
rocommunity  euhostro  192.168.0.11


test with (requires snmp package installed)

snmpwalk -v1 -c euhostro localhost

then from another server:

snmpwalk -v1 -c euhostro IPADRESS
snmpwalk -v2c -c public 192.168.0.1
snmpget -v2c -c public -mALL 192.168.0.1 sysName.0 sysObjectID.0

some good commands