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