KB Article #177115

Webmin SNMP "listen on addresses" not taking effect after snmpd restart

Problem

Oracle Linux Appliance

Changing the "listen on addresses" field in Webmin's SNMP server networking options section has no effect. The SNMP daemon was restarted but netstat always shows snmpd listening on "any" interface.

udp 0 0 0.0.0.0:161 0.0.0.0:*

Resolution

Fixed in wbm-snmpd-1-2 or after. To upgrade

$ yum upgrade wbm-snmpd-1-2

wbm-snmpd1-1 and below can use the following workaround.

Webmin changes the file /etc/default/snmpd.listenaddrs which is reference from /etc/default/snmpd but these files aren't read when snmpd starts up

Workaround is to add the addresses listeners as a space separated list to the file /etc/sysconfig/snmpd.options

e.g.

# snmpd command line options
OPTIONS="-Lsd -Lf /dev/null -p /var/run/snmpd.pid -a 10.142.56.34 127.0.0.1"

Now we find listeners are correct as expected

udp 0 0 127.0.0.1:161 0.0.0.0:*
udp 0 0 10.142.56.34:161 0.0.0.0:*