I'm struggling to get NAT working on my Raspberry Pi as I intend.
Without giving a lot of information, this is the issue I encounter
$ sudo iptables -t nat -A PREROUTING -p tcp -i wlan0 --dport 2222 -j DNAT --to 192.168.2.241:22
iptables v1.8.2 (nf_tables): unknown option "--to"
Try `iptables -h' or 'iptables --help' for more information.
I believe this is supposed to map any incoming connection on port 2222, protocol tcp, interfact wlan0 to the ip address and port 192.168.2.241:22.
However I get this error that the switch --to is not recognized.
I also tried using --to-destination however that also fails.
Is this due to some new update with Raspbian / Debian 10?
-dwas the ame as--to-destination- cheers & all the best! – user3728501 May 05 '20 at 13:49-dshould be changed to-s(source) and that--to-destinationshould be changed to-d- but looking again I'm not sure this is the case, since there seems to be no way to specify port translation with these options? Apparenly myiptablesisv1.8.2. A lot of online documentation refers to--to-destinationas an option, which isn't available inv1.8.2, apparently. Any idea why this might be? – user3728501 May 06 '20 at 00:05