Install service and create user
1. sudo yum -y install net-snmp net-snmp-utils
2. net-snmp-create-v3-user -ro -A <authPass> -a {MD5|SHA1} -X <encPass> -x {DES|AES} <user>
3. service snmpd restart
Configure firewall
if iptables
3.
iptables -A INPUT -p udp -s <SNMP-server> --dport 161 -j ACCEPT
iptables -A INPUT -p udp -s <SNMP-server> --dport 162 -j ACCEPT
service iptables restart
if firewall-cmd
3.
sudo firewall-cmd --zone=public --permanent --add-rich-rule 'rule family="ipv4" source address="<SNMP-server>" port port=161 protocol=udp accept'
sudo firewall-cmd --zone=public --permanent --add-rich-rule 'rule family="ipv4" source address="<SNMP-server>" port port=162 protocol=udp accept'
sudo firewall-cmd --reload
Set the SNMP Deamon to autostart
/etc/init.d/snmpd start
chkconfig snmpd on
Trouble shooting
snmpwalk -u snmpv3user -A authPass -a
{MD5|SHA1}
-X encPass -x
{DES|AES}
-l authPriv 127.0.0.1 -v3
sudo netstat -tulpn | grep 161
sudo service iptables status
sudo systemctl status firewalld
sudo firewall-cmd --list-all
Kommentarer
Skicka en kommentar