Hello,
I just want to configure a port forwarding on my Raspberry 4.
My wifi-NIC has another Network ( 192.168.0.x) then the LAN-NIC (192.168.1.x).
I want to forward a request coming in on pot 8443 to the port 443 on another device in the LAN-network.
Does it works via commands , or do I have to modify a config file, and which one ?
Kind regards
It is a simple command:
iptables -t nat -I PREROUTING -i wlan0 --dport 8443 -d 192.168.0.X -j DNAT --to-destination 192.168.1.Y:443
Fix the addresses and the wlan0
interface if it is different. 
You would need to run this command in startup. Install iptables-persistent
and run the command iptables-save > /etc/iptables/rules.v4
Thank you ,
I tried it but I got i tried it, but I got ‘unknown option “–dport”.’
So I need to check all parameters of the iptables command to find out what went wrong.
Right, I forgot the -p tcp
Thank you,
Not i got no error message, so command is ok.
I not yet get acess to the webserver of the device, but now it can search the way via wireshark.
Maybe I have to configure the way back too…
Yes, if you have asymmetric routing it can be a reason for failure.