我以为有一个简单的ipv6防火墙,但事实certificate是地狱。 不知何故,我真的不能连接任何ipv6从我的机器,除非我设置INPUT政策接受。 在我目前的ip6tables下面
ip6tables -L
Chain INPUT (policy DROP) target prot opt source destination ACCEPT all anywhere anywhere state RELATED,ESTABLISHED ACCEPT ipv6-icmp anywhere anywhere ACCEPT tcp anywhere anywhere tcp dpt:http ACCEPT tcp anywhere anywhere tcp dpt:https Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination
如果我尝试连接任何ipv6 adres它不起作用?
telnet gdata.youtube.com 80 Trying 2a00:1450:4013:c00::76...
要么
telnet gdata.youtube.com 443 Trying 2a00:1450:4013:c00::76...
当我设置:
ip6tables -P INPUT ACCEPT
它的工作..但后来..那么一切都是开放的? 到底是怎么回事? 帮帮我?
您可能错过了关键的“有状态”规则:
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
您还缺less接受ICMPv6的规则。 没有ICMPv6,IPv6根本不起作用。
-A INPUT -p ipv6-icmp -j ACCEPT
出于性能原因,这应该是您链条中最早的规则之一。