After setting up my rules with iptables and checking that everything works, I also set up the same rules for the IPv6 addresses and noticed that I cannot connect to any of my server's IPv6 address and port. The default policy is to DROP
everything except the ports I allow manually.
The rules looks like:
-P INPUT DROP
-A INPUT -i lo -j ACCEPT
-A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
...
To be honest, I ran those commands with iptables
and ip6tables
and while everything works fine with IPv4, I cannot connect via IPv6 from outside.
Am I supposed to allow additional things for IPv6 that IPv4 does not require?