Port forwarding in dietpi Raspberry 4

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. :slight_smile:
You would need to run this command in startup. Install iptables-persistent and run the command iptables-save > /etc/iptables/rules.v4