The format for the files generated by
ip6tables-save and loadable through
ip6tables-restore stipulates that one can prepend
-6 respectively so as to maintain the rules for IPv4 and IPv6 in the same single file.
The lines with
-4 are ignored by
ip6tables-restore and the ones with
-6 are ignored by
Now, this seems only to apply to rules. How can I create a chain (
:CHAINNAME -) only for either stack?
That is, if I have something like (excerpt):
*filter :ICMPv6 - -6 -A INPUT -p icmpv6 -j ICMPv6
how can I make sure that the chain is only created for the IPv6 stack but not the IPv4 stack?
Is this at all possible?