I do not know how to do routing between Lan#1 and Lan#2 I tried with static routing set protocols static route next-hop distance '1' but I do not understand it.

1. Interfaces

run show interfaces ethernet 
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface        IP Address                        S/L  Description
---------        ----------                        ---  -----------
eth0                     u/u  OUTSIDE 
eth1                      u/u  INSIDE 

2. Gateway


3. NAT

I can do next NAT, then there is routing and internet but this (2 x NAT in network) is incorrect

edit nat source r 1
set outbound-interfeace eth0
set source address
set translation address masquerade

enter image description here


I know it's kind of late response to the question but I guess it's important for future readers. Routing between two networks/LANs/Subnets is automatic as long as both are directly connected to the VyOS router. You can check this by running the command show ip route. One critical thing to make sure is that in both sides of the router the devices need to point to it, that is, the devices must be configured with the gateway IP address as the addresses of the router interfaces respectively. In your example, the eth0 IP address ( must be your gateway for the network, and the eth1 IP address ( must be your gateway for the network. With that you shouldn't have any more problems.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.