How to route to downstream router
-
I have the following setup:
+-------------+ | Cable modem | +------|------+ LAN: 172.16.0.1 | | +------|------+ WAN: 172.16.0.2 | pfSense | Wireguard: 10.100.0.1/24 +-------------+ LAN: 10.0.0.1 | | +------------- WAN: 10.0.0.2 |Unifi router | +-------------+ VLAN 1: 192.168.0.0/24 VLAN 2: 192.168.1.0/24 VLAN 3: 192.168.2.0/24
I want to connect to the WireGuard daemon on the pfSense router through the cable modem and access the servers on the 192.168.x.0/24 subnets. I have port forwarding setup on the cable modem. However I cannot access the servers on the 192.168.x.0/24 subnets since there is no route to them on the pfSense router. How can I define the route to these networks through the downstream Unifi router?
I feel like I need to add something like
route add 192.168.0.0 mask 255.255.0.0 10.0.0.2
but I can't figure out how to do this. -
@yellowbook
Use the GUI to add a static route.System > Routing
At the gateway tab add the downstream routers IP as gateway to the LAN network.
Then move over to "Static Routes" tab and add routes for your networks using this gateway. You may also combine the networks to need only one route, e.g. 192.168.0.0/22. -
@viragomann That worked, thank you!
-
@yellowbook I would hope that you do not have any devices on this lan (10.x.x.x) network your using as transit. If so you would run into asymmetrical routing problems.
Networks that connect routers should not have any devices/hosts on them - if you do without doing host routing on each devices, or natting of the downstream networks you can run into asymmetrical traffic flow problems.