关于SNMP远程管理端连接不上设备代理端问题
关于SNMP远程管理端连接不上设备代理端问题,我遇到过两种情况,这里做一下记录
第一种情况是snmpd.conf问题
注意:关于外部权限设置
两种选择:
rwcommunity public localhost //限制为本机访问
rwcommunity public default //默认的 都可行的
第二种情况就是防火墙问题
iptables 是 Linux 机器上管理防火墙规则的工具。
firewalld 也是 Linux 机器上管理防火墙规则的工具。
看你设备是那种防火墙
1、firewalld的基本使用
启动防火墙: systemctl start firewalld
查看防火墙状态: systemctl status firewalld
停止防火墙: systemctl disable firewalld
禁用防火墙: systemctl stop firewalld
firewall-cmd –state
禁止防火墙
systemctl stop firewalld
启动防火墙
systemctl start firewalld
添加规则
firewall-cmd --permanent --add-port=161/udp
firewall-cmd --permanent --add-port=162/udp
这些规则应用于当前会话
firewall-cmd –reload
**2、iptables 的基本使用
查看防火墙状态:service iptables status 防火墙规则:iptables -L
1.临时关闭,即时生效,重启失效
关闭防火墙:service iptables stop
开启防火墙:service iptables start
2.永久关闭,重启生效
关闭防火墙:chkconfig iptables off
开启防火墙:chkconfig iptables on
如果没有被拦截的话,可以关注配置文件中AgentAddress、端口IP等是否正确,是否允许或禁止了哪些网段等。