0x00 安装yum源安装SNMP软件包
1、yum源安装SNMP服务:
yum -y install net-snmp net-snmp-utils
2、查看SNMP版本号:
snmpd -v
0x01 更改团体名
vi /etc/snmp/snmpd.confcom2sec notConfigUser default publi改为;
com2sec nontConfigUser defautl passw0rd #(此为需要验证的团体名)如果你有权限,你可以看到路由器配置里有一句:show snmp community,其中那个Community SecurityName就是团体名

使设备返回所有被监控值

0x02 重启服务
systemctl start snmpd.service #启动SNMP服务systemctl enable snmpd.service #开机启动SNMP服务
0x03 添加防火墙端口
firewall-cmd --state #查看防火墙状态

firewall-cmd --list-all
vi /etc/firewalld/zones/public.xml<port protocol="udp" port="161"/>
systemctl restart firewalld.service #重启防火墙服务
firewall-cmd --list-all
systemctl restart snmpd.service #重启SNMP服务










