Binding SNMP to Interface/IP

Status
Not open for further replies.

liqd

Cadet
Joined
Oct 3, 2017
Messages
1
Hi Guys,

I am running FreeNAS-9.10.1-U4

So binding SNMP to an interface(address) is proving to be a bit of a headache for me. My findings and what I've tried so far:

- Using agentAdress in the "Auxiliary parameters" field of the SNMP configuration within FreeNAS WebUI
-> This resulted in an error message: "/etc/local/snmpd.conf: line 8: Error: Blank line following <IP>:161 token.". I assume this is because the default freenas "snmpd.conf" includes the "agentAddress" parameter already

- If I enable the SNMP service from within FreeNAS without the Auxiliary parameters, then go on and change the agentAddress in "/usr/local/etc/snmpd.conf" to agentAddress udp:<INTERFACE IP>:161,unix:/var/run/snmpd.sock and restart the service from cli (service snmpd onerestart). The service binds to the correct IP. But changes are lost at reboots and service reloads from FreeNAS
-> I've been considering if making a hackish script to change this setting in "/usr/local/etc/snmpd.conf" and reloading the service. But I am not too keen on this work-around.

Another way would be to setup pf and block for UDP:161 on all the irrelevant interfaces, but in all honesty I would prefer being able to bind snmpd to an address.

Is there any way to achieve this?
 
Status
Not open for further replies.
Top