我试图设置iptables,所以它只会允许我指定的端口上的传入连接。
我设法得到它的工作,但似乎我设法打破传出连接的过程中。
NS的查找和ping都似乎失败了,也可能是其他的一切。
目前的规则:
Chain INPUT (policy DROP) target prot opt source destination ACCEPT tcp -- anywhere anywhere tcp dpt:ssh Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination
那么如何让这项工作,而仍然允许传出连接?
试试:iptables -A INPUT -p TCP -m状态 – 状态ESTABLISHED,RELATED -j ACCEPT