This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For more up to date information, see https://dan.langille.org/2023/08/16/configuration-of-net-mgmt-net-snmpd-on-freebsd/ | |
Do this on the snmpd client: | |
service snmpd stop | |
net-snmp-config --create-snmpv3-user -ro -A 'AuthPass' -X 'PrivPass' -a SHA -x AES MyRoGroup | |
chmod go-rwx /var/net-snmp/snmpd.conf /usr/local/share/snmp/snmpd.conf | |
verify MyRoGroup is in /usr/local/share/snmp/snmpd.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
subnet 192.168.0.0 netmask 255.255.255.0 { | |
range 192.168.0.100 192.168.0.200; | |
option broadcast-address 192.168.0.255; | |
option routers 192.168.0.1; | |
on commit { | |
set ClientIP = binary-to-ascii(10, 8, ".", leased-address); | |
set ClientMac = binary-to-ascii(16, 8, ":", substring(hardware, 1, 6)); | |
log(concat("Commit: IP: ", ClientIP, " Mac: ", ClientMac, "Hostname: ", host-decl-name)); | |
execute("/usr/local/bin/dhcp-event", "commit", ClientIP, ClientMac, host-decl-name); | |
} |