I was installing all my useful pentesting tools in my Raspberry Pi 3 B+ Kali Linux 2019.1 distro. I have to thank Kali Linux development team for this nice Linux distribution, since quite everything worked like a charm, just needing to install, update and upgrade many packages.

But when I was going to install the usefull kalitorify or kali-anonsurf scripts... they were shooting a lot of errors and they didn't work. All the errors were related to iptables execution.
So I tried to run manually:

root@ws-54879:~# iptables -L
iptables: Operation not supported.


And after googling many forums and githubs, I got into the conclusion that this new iptables version (v1.8.2 ) doesn't work well with this kernel build. So I checked for alternative versions:

root@ws-54879:~# update-alternatives --list iptables
/usr/sbin/iptables-legacy
/usr/sbin/iptables-nft

That means that there are two versions of iptables installed in Kali Linux, the legacy and fully working and the next generation (iptables-nft).

root@ws-54879:~# iptables-legacy
iptables v1.8.2 (legacy): no command specified
Try `iptables -h' or 'iptables --help' for more information.

root@ws-54879:~# iptables-legacy -F


When calling the legacy iptables version it worked without throwing errors. So it's not necessary to execute complex solutions to solve this situation. Just specifying the default version for the system it will be enough. I will do it just by modifying the symbolic link in the default path to call the iptables-legacy by default.

root@ws-54879:~# whereis iptables
/usr/sbin/iptables


root@ws-54879:~# mv /usr/sbin/iptables /root/scripts/
root@ws-54879:~#
ln -s /usr/sbin/iptables-legacy /usr/sbin/iptables

And finally iptables from the path works!
root@ws-54879:~# iptables -F

It will be also necessary to install ufw package for kalitorify.
root@ws-54879:~# apt install ufw

And finally kalitorify and kali-anonsurf works again!


root@ws-54879:~# kalitorify -t

#####################################

_____ _ _ _ _ ___
| | |___| |_| |_ ___ ___|_| _|_ _
| -| .'| | | _| . | _| | _| | |
|__|__|__,|_|_|_| |___|_| |_|_| |_ |
|___|

#####################################

=[ Kali Linux
=[ Transparent proxy through Tor

Version: 1.15.0
Copyright (C) 2015-2019 Brainfuck


==> Starting Transparent Proxy
:: Disabling firewall ufw, please wait...
Firewall stopped and disabled on system startup

:: Configure system's DNS resolver to use Tor's DNSPort
'/etc/resolv.conf' -> '/opt/kalitorify/backups/resolv.conf.backup'

:: Disable IPv6 with sysctl
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1

:: Start Tor service
[ ok ] Tor service started

:: Backup iptables... # Warning: iptables-legacy tables present, use iptables-legacy-save to see them
Done
:: Flush current iptables... Done
:: Set new iptables rules... Done

==> Check current status of Tor service
[ ok ] Tor service is active

==> Check Tor network settings
[ ok ] Your system is configured to use Tor

==> Checking your public IP, please wait...
:: IP Address Details:

ip:x.y.z.34,
city:Berlin,
region:Berlin,
countryE,
loc:a.4947,b.2852,
postal:c,
org:AS2000zzPeterMacXXXX

[ ok ] Transparent Proxy activated, your system is under Tor


I hope this helps you!