As others already have told you, there are different firewall tables for IPv4 and IPv6.
You could set up rules for IPv6 like for IPv4, but there are a great risk you'll mess it up if you don't know IPv6. Like, you can't drop ICMP
for IPv6, as there are essential handshake parts there. Like telling the sender that the frames are to large, etc. Without those things, IPv6 could stop working for some users.
So it would strongly recommend the use of ufw
or the package shorewall6
together with shorewall
.
The iptables
frontend ufw
supports both IPv4 and IPv6 and works great on servers with one or two interfaces and now also do support simple routing (work as a router or gateway).
It also support applications and comments, so please use them to make it simpler to go back and look at what you have done.
But if you route traffic, you probably need something better, like shorewall
before manually add some rules for forwarding with iptables
and ip6tables
.
Don't forget that you can have more than one IPv6 addresses on your interfaces. Some are only link local, some are globally static and dynamic. So you should set up rules accordingly and the servers only listening on the right addresses.
And again, using iptable
directly is like coding in assembler. It is fun, but if you don't know all relevant RFC:s, you should not do that, use some front end.
iptable
as that is way to low level for most users. Use a front end, likeufw
to set up firewall rules. A simple rule of thumb is that if you need to ask, you should probably not useiptable
directly. – Anders Jan 26 '22 at 18:28