I have migrated my Ubuntu Focal server firewall backend from legacy iptables to netfilter, by running update-alternatives --set iptables /usr/sbin/iptables-nft
and rebooting the server. Now all tables shown in iptables-legacy -S
are empty, but when I run iptables -S
the last line always says:
# Warning: iptables-legacy tables present, use iptables-legacy to see them
I have since removed iptables-legacy
from alternatives using the following command:
update-alternatives --remove iptables /usr/sbin/iptables-legacy
And now only the netfilter version is shown
root@iBug-Server:~# update-alternatives --display iptables
iptables - auto mode
link best version is /usr/sbin/iptables-nft
link currently points to /usr/sbin/iptables-nft
link iptables is /usr/sbin/iptables
slave iptables-restore is /usr/sbin/iptables-restore
slave iptables-save is /usr/sbin/iptables-save
/usr/sbin/iptables-nft - priority 20
slave iptables-restore: /usr/sbin/iptables-nft-restore
slave iptables-save: /usr/sbin/iptables-nft-save
How can I get rid of this warning?