Static NAT between two lan

Hello all,

I am trying to configure OpenWRT to interconnect two networks, using two different switches.

I have two computers ( and on a local machine network that I need to show on the local network with fixed IPs I want to NAT static ( and

I tried to find how I could do that but I am lost in the configuraion and the interfaces.

OpenWRT is running on a raspberry Pi 4, eth0 is the onboard RJ45 connected to the local network and eth1 is a USB to RJ45 adapter connected to the machine network

If someone could explain me the way to go, it would be nice.

Are you sure you do need to configure a NAT and not just proper routes to reach one subnet from the other?


Hello bernd,

Yes I need a NAT, as SW2 is also communicating with a third network, and this third network should see as a 10.130.130.x device

It'll probably be a lot simpler for people to assist if you explain the full setup, rather than a small snippet.

1 Like

It woubld be best to avoid NAT and create a static route on the gateway of your third network to the subnet via the IP of OpenWrt in the subnet.

Otherwise, enable masquerading on the firewall zone assigned for the subnet on OpenWrt.