Thursday, May 9, 2024
 Popular · Latest · Hot · Upcoming
8
rated 0 times [  8] [ 0]  / answers: 1 / hits: 11440  / 2 Years ago, sun, april 3, 2022, 10:27:14

According to 21.10 release notes:



nftables is now the default backend for the firewall.



However, having installed Ubuntu 21.10, I can see I still have iptables (and ufw) installed by default:


m@m-VirtualBox:~$ whereis iptables

iptables: /usr/sbin/iptables /usr/share/iptables /usr/share/man/man8/iptables.8.gz

m@m-VirtualBox:~$ whereis ufw

ufw: /usr/sbin/ufw /usr/lib/ufw /etc/ufw /usr/share/ufw /usr/share/man/man8/ufw.8.gz

Why does this happen?


As far as I'm aware, ufw is a wrapper around iptables, not nftables.


Can I safely use these commands? Or should I take care to never type iptables or ufw in the terminal?


More From » iptables

 Answers
6

After your whereis iptables command, you should follow the files. Example, from a 20.04 server:


doug@s19:~$ whereis iptables
iptables: /usr/sbin/iptables /usr/share/iptables /usr/share/man/man8/iptables.8.gz
doug@s19:~$ ls -l /usr/sbin/iptables
lrwxrwxrwx 1 root root 26 Jan 23 2020 /usr/sbin/iptables -> /etc/alternatives/iptables
doug@s19:~$ ls -l /etc/alternatives/iptables
lrwxrwxrwx 1 root root 22 Apr 18 2021 /etc/alternatives/iptables -> /usr/sbin/iptables-nft
doug@s19:~$ ls -l /usr/sbin/iptables-nft
lrwxrwxrwx 1 root root 17 Feb 28 2020 /usr/sbin/iptables-nft -> xtables-nft-multi
doug@s19:~$ ls -l /usr/sbin/xtables-nft-multi
-rwxr-xr-x 1 root root 220488 Feb 28 2020 /usr/sbin/xtables-nft-multi

So, iptables is actually using nftables.


nftables can interpret iptables syntax.


[#1080] Monday, April 4, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
llianconclad

Total Points: 65
Total Questions: 109
Total Answers: 127

Location: Mali
Member since Fri, Dec 3, 2021
2 Years ago
llianconclad questions
Sun, May 1, 22, 08:47, 2 Years ago
Tue, Nov 8, 22, 02:33, 2 Years ago
Mon, Aug 23, 21, 15:58, 3 Years ago
Sun, Jul 25, 21, 18:19, 3 Years ago
;