Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Seeming simple but how to: Multiple WAN and LANs

    Scheduled Pinned Locked Moved Routing and Multi WAN
    4 Posts 4 Posters 1.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T Offline
      tmc
      last edited by

      I have 2 LANs into a PFSense box.  Now I wish to setup LAN 1 to go to WAN 1 interface and the other LAN 2 to go out another WAN (2) interface.  When I try to set the gateway on the LAN 2 to the IP of the WAN 2 gateway, it says it must be in the same subnet as LAN 2 or if I leave gateway empty it routes through WAN 1.  How do I route all traffic out of LAN 2 to WAN 2?

      1 Reply Last reply Reply Quote 0
      • johnpozJ Offline
        johnpoz LAYER 8 Global Moderator
        last edited by

        Well for one you never put a gateway on the actual "lan" interface.  You just setup rule on the firewall for lan2 to use your wan2 gateway, and rule on your lan1 interface to use wan1 gateway.

        https://doc.pfsense.org/index.php/Multi-WAN_2.0

        An intelligent man is sometimes forced to be drunk to spend time with his fools
        If you get confused: Listen to the Music Play
        Please don't Chat/PM me for help, unless mod related
        SG-4860 25.07.1 | Lab VMs 2.8.1, 25.07.1

        1 Reply Last reply Reply Quote 0
        • L Offline
          lockye
          last edited by

          I am trying to do exactly the same as you, I have found a work-round for the subnet but I still can't get it to work correctly.

          Have you managed too?

          1 Reply Last reply Reply Quote 0
          • P Offline
            phil.davis
            last edited by

            In pfSense/FreeBSD (like other OSes I can think of), a gateway is the IP address of another box to which the computer can send data packets destined for some group of other IP subnets (or for all). The interfaces that have gateways are dealt with as WAN-type, the gateway is supposed to be on that WAN subnet on a different machine (ISPs router, some other box on the way to the internet.
            Define a gateway on each WAN pointing to the upstream IP address of the path to the internet.
            Remove any gateways from LAN.
            Set whichever WAN gateway you prefer to be the default route.
            Add policy-routing rules (rules that pass traffic and send it into a gateway).
            On LAN1: Pass protocol any source LAN1net destination any gateway WAN1GW
            On LAN2: Pass protocol any source LAN2net destination any gateway WAN2GW

            If you want failover, then make gateway groups with the required order of preference and feed the traffic into the gateway groups.

            As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
            If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.