Skip to content

Instantly share code, notes, and snippets.

@helloavo
Created June 7, 2023 17:34
Show Gist options
  • Select an option

  • Save helloavo/ab93ce7eb4ffed68e831fd31cef54c21 to your computer and use it in GitHub Desktop.

Select an option

Save helloavo/ab93ce7eb4ffed68e831fd31cef54c21 to your computer and use it in GitHub Desktop.
Simple snmpd deployment on Debian
# 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'
@helloavo

helloavo commented Jun 7, 2023

Copy link
Copy Markdown
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment