Configure the SNMP V3 user by running the following command and then following the prompts it gives you.
Example: The username is “snmpadmin” and the password is”r123456″
[root@localhost ~]# net-snmp-create-v3-user
Enter a SNMPv3 user name to create:
Enter authentication pass-phrase:
Enter encryption pass-phrase:
[press return to reuse the authentication pass-phrase]
adding the following line to /var/lib/net-snmp/snmpd.conf:
createUser snmpadmin MD5 "r123456" DES
adding the following line to /etc/snmp/snmpd.conf:
Start snmpd service
service snmpd start
configure snmp to start on system boot.
chkconfig snmpd on
Test and make sure snmp is working
replace “password” and “username” with the ones you setup when you created the SNMP V3 user.
snmpwalk -v 3 -a MD5 -A password -l authNoPriv -u username localhost
If you receive something like “snmpwalk: Timeout” then something is not working correctly. Check to make sure the service is started, and make sure that your firewall is not blocking SNMP.
If you are running a firewall, run the following commands to allow it through.
firewall-cmd --zone=public --add-port=161/udp --permanent
semanage port -a -t snmp_port_t -p udp 161
On iptables you should be able to do
iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 161 -j ACCEPT
or add it to /etc/sysconfig/iptables and then restart iptables
So the command to allow port 80 through the firewall would be
firewall-cmd --zone=public --add-port=http/tcp
firewall-cmd --zone=public --add-port=80/tcp
The above command only works for the running instance of firewalld. If you want to add the port permanetely you need to run the above command and then run it again with “–permanent” added to the end of the command.
You can do this by going to
Control Panel –> System and security –> Windows Firewall –> Advanced settings
Or hit the Windows key and type in firewall and hit enter
Select Inbound rules and then add a New Rule. On the New Inbound Rule Wizard select Custom for the type of rule and hit next. Allow All programs and then hit next again. Select ICMPv4 as the Protocol type and if you want you can specify the ICMP types by clicking on the Customize button. Finish running through the wizard give it a name etc. and click Finish when your done.