sudo apt install snmpd snmp libsnmp-dev -y
sudo cp /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.bak
sudo rm /etc/snmp/snmpd.conf
sudo nano /etc/snmp/snmpd.conf
#Listen for connections on all interfaces (both IPv4 and IPv6)
agentAddress udp:161,udp6:[::1]:161
rocommunity abcd1234 0.0.0.0/0
echo "agentAddress udp:161,udp6:[::1]:161" >> /etc/snmp/snmpd.conf
echo "rocommunity public 0.0.0.0/0" >> /etc/snmp/snmpd.conf
sudo service snmpd restart
sudo service snmpd status
snmpd.service - Simple Network Management Protocol (SNMP) Daemon.
Loaded: loaded (/lib/systemd/system/snmpd.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2023-06-12 04:34:17 UTC; 950ms ago
Process: 8471 ExecStartPre=/bin/mkdir -p /var/run/agentx (code=exited, status=0/SUCCESS)
Main PID: 8472 (snmpd)
Tasks: 1 (limit: 9470)
Memory: 5.1M
CGroup: /system.slice/snmpd.service
└─8472 /usr/sbin/snmpd -LOw -u Debian-snmp -g Debian-snmp -I -smux mteTrigger
Jun 12 04:34:17 tsg systemd[1]: Starting Simple Network Management Protocol (SNMP) Daemon....
Jun 12 04:34:17 tsg systemd[1]: Started Simple Network Management Protocol (SNMP) Daemon..
5/5 - (1 vote)