I’m trying to set up some iptables rules in both Debian and Ubuntu, but I’m not sure how to make them persistent. As far as I understand the iptables package in the debian and Ubuntu repos is actually iptables-nft meaning I’m actually creating nftables rules, so I’m supposed to use iptables-nft-save to save them instead of using the normal method for iptables or nftables? But that command just seems to produce an output that doesn’t match the syntax for iptables or nftables and the man page is not very helpful.
I’m also confused why Ubuntu does seem to have the /etc/iptables/rules.v4 and v6 files but Debian doesn’t? Both seem to have /etc/nftables.conf as well but I’m not sure if that’s even used (the Ubuntu machine has a bunch of iptables rules already defined which don’t show up there but do show up in nft list ruleset)
Ah worst you can use a shell script and a systemd service to apply them at boot