Created
June 7, 2023 17:34
-
-
Save helloavo/ab93ce7eb4ffed68e831fd31cef54c21 to your computer and use it in GitHub Desktop.
Simple snmpd deployment on Debian
This file contains hidden or 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
| # Change RANDOMSTRINGGOESHERE to your preferred SNMP community string | |
| com2sec readonly default public | |
| group MyROGroup v2c readonly | |
| view all included .1 80 | |
| access MyROGroup "" any noauth exact all none none | |
| #Distro Detection | |
| extend distro /usr/bin/distro | |
| #Hardware Detection (uncomment to enable) | |
| extend hardware '/bin/cat /sys/devices/virtual/dmi/id/product_name' | |
| extend manufacturer '/bin/cat /sys/devices/virtual/dmi/id/sys_vendor' | |
| extend serial '/bin/cat /sys/devices/virtual/dmi/id/product_serial' |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Simple snmp deamon install and configuration on Debian, assumed running as root account.
Configuration suitable for HomeLab, read only public account. Consider adding allowed hosts and better random string then public.
Location and Contact have been removed.
apt update && apt dist-upgrade -y && apt install curl snmpd -y && curl -o /etc/snmp/snmpd.conf https://gist.githubusercontent.com/helloavo/ab93ce7eb4ffed68e831fd31cef54c21/raw/aec0fd2d37a8f6084e134fd1f9dd3394bca6462d/snmpd.conf && ip addr | grep inet && systemctl enable snmpd --now && systemctl restart snmpd