I experienced the same problem immediately after installing ufw
:
$ sudo ufw status
ERROR: Couldn't determine iptables version
But after reboot
ing (without changing any other settings) it started working (as suggested here):
$ sudo ufw status
Status: active
$ update-alternatives --display iptables | grep currently
link currently points to /usr/sbin/iptables-nft
$ uname -a
Linux raspberrypi 5.10.11+ #1399 Thu Jan 28 12:02:28 GMT 2021 armv6l GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 10 (buster)
Release: 10
Codename: buster
$ dpkg -s ufw | grep Version
Version: 0.36-1
$ dpkg -s iptables | grep Version
Version: 1.8.2-4
I'm not sure, but I think this Debian bug is related. If so, it's supposed to be fixed in Debian's ufw
package's 0.36-3 version.