Can't route to the internet


#1

Hi,
I’m trying to setup a vyos router with 2 interfaces. eth0 would be my internet facing interface and my home router’s ip is 192.168.254.1. From any of my VLANS (110,120,130) I can ping all the interfaces on my router including the WAN side of my router 192.168.254.39. But I can’t seem to ping past it. I tried to ping my home router 192.168.254.1, but no luck. Below is my configuration. I’m using Fusion 8. Thanks in advance.

vyos@vyos:~$ show interfaces
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface IP Address S/L Description


eth0 192.168.254.39/24 u/u OUTSIDE
eth1 - u/u INSIDE
eth1.100 192.168.100.1/24 u/u VLAN 100
eth1.110 192.168.110.1/24 u/u VLAN 110
eth1.120 192.168.120.1/24 u/u VLAN 120
lo 127.0.0.1/8 u/u
::1/128
vyos@vyos:~$ config

[edit]
vyos@vyos# show
interfaces {
ethernet eth0 {
address 192.168.254.39/24
description OUTSIDE
duplex auto
hw-id 00:0c:29:60:e9:5f
smp_affinity auto
speed auto
}
ethernet eth1 {
description INSIDE
duplex auto
hw-id 00:0c:29:60:e9:69
smp_affinity auto
speed auto
vif 100 {
address 192.168.100.1/24
description “VLAN 100”
}
vif 110 {
address 192.168.110.1/24
description “VLAN 110”
}
vif 120 {
address 192.168.120.1/24
description “VLAN 120”
}
}
loopback lo {
}
}
protocols {
static {
route 0.0.0.0/0 {
next-hop 192.168.254.1 {
distance 1
}
}
}
}


I found my issue. I need to setup the nat. I didn’t think i needed it, but apparently you do.

set nat source rule 120 outbound-interface ‘eth0’
set nat source rule 120 source address ‘192.168.120.0/24’
set nat source rule 120 translation address ‘masquerade’

Hope this helps someone else.