我愿意为 IPv6 配置 iptables 和 ip6tables。但是由于某些未知原因,我的配置中的最后一个 ip6tables 规则阻止了我的服务器的任何传出连接(apt-get、wget、ping、ping6 等)。服务器是 Debian 8.1,这是一个配置了 IPv6 的 DO droplet。
这是配置:
#!/bin/sh
# Flush all existing first
sudo iptables -F
# Disable tracking
sudo iptables -t raw -I PREROUTING -p tcp --dport 80 -j NOTRACK
sudo iptables -t raw -I PREROUTING -p tcp --dport 22 -j NOTRACK
sudo iptables -t raw -I OUTPUT -p tcp --dport 80 -j NOTRACK
sudo iptables -t raw -I OUTPUT -p tcp --dport 22 -j NOTRACK
# Local
sudo iptables …
Run Code Online (Sandbox Code Playgroud)