I am using Raspbian on a Raspbery Pi (based on Debian 10) and I'm trying to use the following line in my iptables rule set:
-A POSTROUTING -s 2.3.4.5/26 -o eth0 -j SNAT --to-source 1.2.3.4
However when I try to load the rule file with iptables-restore I get the following error:
iptables-restore v1.8.2 (nf_tables): unknown option "--to-source"
Error occurred at line: 8
Try 'iptables-restore -h' or 'iptables-restore --help' for more information.
I am 99.9 % sure that the line is correct, there are many tutorials online that use exactly this line. The option --to-source
is even mentioned in the man page for iptables.
Any ideas? Is this a bug?