我的服务器是仅支持 IPv6 的服务器,我正在尝试使用 ip6tables 编写防火墙规则,它看起来像这样
Chain INPUT (policy ACCEPT)
num target prot opt source destination
1 ACCEPT all anywhere anywhere /* Allow loopback interface packets */
2 ACCEPT all anywhere anywhere ctstate RELATED,ESTABLISHED
3 ACCEPT tcp anywhere anywhere tcp dpt:http
4 ACCEPT tcp anywhere anywhere tcp dpt:https
5 ACCEPT tcp anywhere anywhere tcp dpt:ssh ctstate NEW,ESTABLISHED /* Allow ssh traffic */
6 DROP all anywhere anywhere /* Drop the remaining packets */
Chain FORWARD (policy ACCEPT)
num target prot opt source destination
Chain OUTPUT (policy ACCEPT)
num target prot opt source destination
正如预期的那样,即使没有最后一条规则,我也能访问我的网络服务器并 ssh 进去,但添加最后一条规则会阻止一切,即使有 3、4、5 条规则。我是不是漏掉了什么?