As always, I seem to forget things, among theese is the SNMP setup for Ubuntu, so now, for myself to remember, I created this little guide 🙂
This is btw. run on a Ubuntu Server 20.04 LTS
Run the following commands on the terminal:
- Update all packages:Â sudo apt-get update
- Install SNMP:Â sudo apt-get install snmpd
- Edit snmpd.conf with text editor of your choice, I will be using nano, as this is an easy editor, so type: sudo nano /etc/snmp/snmpd.conf
- Configure agentAddress:Â agentAddress udp:161,udp6:[::1]:161
-This will set the server to listen on all IPv4 and IPv6 addresses (remove the ‘#’ in front of the agentAddress, to enable it!)
– To bind it to a specific IP address use (ex.): agentAddress udp:192.168.1.5:161 - Configure rocommunity:Â rocommunity public
-Change “public” to your community name - Restart the SNMPD service:Â sudo service snmpd restart
- Check that SNMPD is started OK with this: sudo service snmpd status
All good! – Now go setup your favorite monitoring tool for SNMP access 🙂