Routing between 2 pfsense LANs



  • I want to have a setup like this:

    I have 2 separate WAN connections coming in to 2 separate pfsense boxes. I don't want to load balance, failover, etc. between them. I just want it so if a computer on LAN1 wants to access a computer on LAN2 (using it's lan IP of course), it goes through OPT1->OPT2 and talks with LAN2 (and vice versa) . Basically, I want local traffic between the LAN subnets to talk to each other, but any other traffic attempts to go out the WAN like normal. Is my current setup on the right track?

    With the current setup, OPT1 can ping OPT2 using the built in pfsense ping. LAN1 pcs can ping OPT1. LAN2 pcs can ping OPT2. But LAN1 pcs can't ping OPT2 and vice versa.

    I have been playing with static routes… for example adding 192.168.2.1/24 on the pfsense box that contains LAN1, and giving it a gateway of 10.1.1.1, but I don't think it's what I need to do, or I'm not doing everything I need to for routing between these LANs.

    The OPT interfaces can ping each other using the internal ping, so the hardware connection is good, it's just a matter of tweaking the route settings. Any ideas on the simplest way to go? Thanks  :)



  • @soma:

    I have been playing with static routes… for example adding 192.168.2.1/24 on the pfsense box that contains LAN1, and giving it a gateway of 10.1.1.1, but I don't think it's what I need to do, or I'm not doing everything I need to for routing between these LANs.

    The 10.1.1.1 box doesn't know where 192.168.2.0/24 is so that won't work.  You have to set the gateway to the IP of the box that knows where the other subnet is.

    DHCP box:

    Static route 192.168.2.0/24 to 10.1.1.2

    PPPoE box:

    Static route 192.168.1.0/24 to 10.1.1.1

    You will probably need to add rules to the OPT interfaces to allow traffic from the OTHER box's LAN subnet when the destination address is in the LOCAL box's LAN subnet.

    Just add the routes and test first.  Do not make a lot of changes all at once.


Log in to reply