牧羊岛

懒是不会有好果子吃滴//

导航

Cacti监控Centos抓包unreachable - admin prohibited

Posted on 2014-08-08 09:45  牧羊岛  阅读(4088)  评论(0编辑  收藏  举报
09:10:41.023399 IP 192.168.1.80 > 192.168.2.182: ICMP host 192.168.1.80 unreachable - admin prohibited, length 79

抓包发现总是有这个出现,而且是跟在GetRequest后面。

打开iptables配置:

最开始网上找的配置语句是这个,

-A INPUT -p udp -m udp --sport 161 -j ACCEPT

后面以为还需要开放tcp,又加了一条,

-A INPUT -p tcp -m state --state NEW -m tcp --dport 161 -j ACCEPT 
-A INPUT -p udp -m udp --sport 161 -j ACCEPT

最后发现udp那条是错误的,于是,

-A INPUT -p udp -m state --state NEW -m udp --dport 161 -j ACCEPT

再抓包,就看见每个GetRequest后面都是GetResponse了。

顺便记下这次抓包的命令

tcpdump -nn -X 'host 192.168.2.182' -c 10