我今天配置iptables如下。
Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere tcp dpt:http
ACCEPT all -- localhost anywhere
然后我就wget不了了。
sudo wget http://cn.wordpress.org/wordpress-3.4.2-zh_CN.zip
--2012-11-24 10:51:53-- http://cn.wordpress.org/wordpress-3.4.2-zh_CN.zip
正在解析主机 cn.wordpress.org...
解析主机错误。 应该解析主机返回的信息被Drop了。我改怎么办?
我觉得是把ICMP协议Accept了。但是事实证明不行。
求助
/sbin/iptables -A INPUT -p UDP --sport 53 -j ACCEPT
加一条
iptables -A INPUT -p tcp -m state --state ESTABLISH,RELATED -j ACCEPT