Open papamoose opened 2 years ago
A small note for anyone running into the problem where their IPv6 iptables rules are ignored. For me, on ubuntu 22.04, the sudo nft list tables
command will not return the filter table for IPv6 (table ip6 filter
) if there are no IPv6 filter rules present. That caused iptables_raw to ignore all ip6 filter
rules (any INPUT DROP, ACCEPT, etc).
To solve this, I bootstrapped the ip6tables INPUT chain with a single dummy rule. That caused the IPv6 filter table to show up in nft, and after that everything went smooth.
Fixes from #30 and #35 plus small tweaks of my own.
nft -j list tables ip
returnsmetainfo
as a key in the json we get back. So check to make sure the key 'table' exists we can ignoremetainfo
key in the loop.Additionally, nft command seems to want the
-j
before all other arguments.