我的nftables.conf只是运行flush ruleset然后include我的防火墙规则。 我已经从Arch wiki复制了他们。 所以包含的firewall.rules包含:
# An iptables-like firewall table firewall { chain incoming { type filter hook input priority 0; # established/related connections ct state established,related accept # invalid connections ct state invalid drop # loopback interface iifname lo accept # icmp icmp type echo-request accept # open tcp ports tcp dport {http, https, ...} accept # open udp ports udp dport {...} accept # drop everything else drop } } table ip6 firewall { chain incoming { type filter hook input priority 0; # established/related connections ct state established,related accept # invalid connections ct state invalid drop # loopback interface iifname lo accept # icmp icmpv6 type {echo-request,nd-neighbor-solicit,nd-router-solicit,mld-listener-query} accept # open tcp ports tcp dport {http, https, ....} accept # open udp ports udp dport {...} accept # drop everything else drop } }
所以,当一切都加载我不能使用IPv6, ping6错误
From ams16s21-in-x0e.1e100.net icmp_seq=1 Destination unreachable: Address unreachable
但是,如果我运行sudo nft flush table ip6 firewall , ping6立即开始按预期工作。 如果我然后重新build立ip6防火墙表,IPv6连接不立即失败,但等待几分钟,我发现ping6命令返回上述错误。
我的托pipe服务提供商在networking级别fwiw上不提供任何IPv6自动configuration或路由器通告。
任何人都看过这样的事情吗?
IPv6连接不会立即失败,但等待几分钟,我发现ping6命令返回上述错误。
我想你已经破坏了邻里的发现。 最初的事情继续工作,因为你已经在邻居发现caching中的东西,但后来的条目超时。
您似乎允许邻居请求消息,但不允许邻居通告消息。
你正在丢弃太多的ICMPv6types。 由于state established,related的state established,related ,大多数错误消息都应该被允许,但是您将丢弃邻居广告和路由器通告。 试试这个:
icmpv6 type {echo-request,nd-neighbor-solicit,nd-neighbor-advert,nd-router-solicit, nd-router-advert,mld-listener-query} accept
这将允许不请自来的NA和RA,这可能会解决您的问题。
如果你想确保错误消息也能通过(我没有testing,如果state established,related确实适用于所有的ICMPv6错误消息),那么也添加这些:
icmpv6 type {echo-request,nd-neighbor-solicit,nd-neighbor-advert,nd-router-solicit, nd-router-advert,mld-listener-query,destination-unreachable, packet-too-big,time-exceeded,parameter-problem} accept
不应该是必要的,但以防万一:)删除ICMPv6错误消息将导致严重的延迟,甚至阻止连接,所以最好避免:)