-Installing SNMPD on OpenWRT and config of a simple snmpv1 community.

  • opkg install snmpd

  • Setup a input firewall rule UDP161 for the accessing host

  • Set /etc/config/snmpd.conf...

config agent
        option agentaddress UDP:161

config agentx
        option agentxsocket /var/run/agentx.sock

config com2sec public
        option secname ro
#The host IP accessing
        option source x.x.x.x/32
        option community YOURCOMMUNITYNAME

config group public_v1
        option group public
        option version v1
        option secname ro

config view interface
        option viewname interface
        option type included
#Only allow access to interfaces OID
        option oid .

config access public_access
        option group public
        option context none
        option version any
        option level noauth
        option prefix exact
        option read interface
        option write none
        option notify none

config system
        option sysLocation      'M0VPN QTH'
        option sysContact       ''
        option sysName          ''
        option sysDescr         'QTH Router'

config exec
        option name     filedescriptors
        option prog     /bin/cat
        option args     /proc/sys/fs/file-nr

config engineid
        option engineidtype '3'
        option engineidnic 'eth0'

config snmpd general
        option enabled '1'