Multi WAN - Route Traffic Via One WAN Link

  • Hi, I have a LAN with 2 segments in the same subnet and two WAN links. Need to route segment 1 ( - via WAN 1 and segment 2 ( - via WAN 2. I've been trying for several days but traffic seems to route via the default gateway always. Attached is a pic of my LAN rules i made for testing (route LAN Net via Gateway 2). Could someone help me please.

    Thank You,


  • First of all what/why are you trying to do this?
    Second..  The source is the entire lan net and you need to specify a network range instead of the entire lan net.

  • The two WAN links I have are of different bandwidths and data limitations. So I need to divide users and also the rule I made is to test, to rout the whole LAN via the secondary WAN link. I tried creating Aliases to group users too but did not succeed.

  • LAYER 8 Netgate

    Your gateway rule is protocol TCP only. Probably not what you want.

    ( - via WAN 1 and segment 2 ( -

    Those are not segments. They are ranges of IP addresses.

    Do yourself a favor and do things like this on natural IP subnet boundaries instead of decimal.

    The 31 addresses through would be a lot easier to deal with if they were, say, through which can be used in firewall rules as 41-70 could be 64-95 or

    While you can use, in these examples, .32 and .63, and .64 and .95 for host addresses, I would not because if you ever decide to put these subnets on actual interfaces, those would be the network and broadcast addresses and therefore unusable. Along that same line of thinking I would also avoid using .33 and .65, which would be the router interface addresses. Exclude a couple more to reserve room for future CARP/HA.

  • Hi Derelict,

    Added as an Alias and checked with the IP, but the result is the same. The traffic is still routed via the Default Gateway. Changed the rules as you mentioned from TCP to TCP/UDP as well. When creating Aliases, it says we can define a range as well as a Subnet. Attached Rules, Created Alias.


    ![fw rule.PNG](/public/imported_attachments/1/fw rule.PNG)
    ![fw rule.PNG_thumb](/public/imported_attachments/1/fw rule.PNG_thumb)

  • LAYER 8 Netgate

    No idea what you're doing.

    Why not create a network alias of / 27 instead of all those host entries? That's sort of the point.

    Why TCP/UDP Only? Why not any? As it is pings (protocol ICMP) will be blocked.

    How are you testing?

    This really does just work.

  • Did exactly what you said. Added a Network Alias as, Protocols - any, added the ip to a pc on the LAN with manual proxy set to port 3128 (default), gateway set to pfsense,  did not work. Checked with the subnet /24 which is the default on our LAN, still no difference. Where am I wrong now pls…..

  • LAYER 8 Netgate

    How are you testing?

    You are trying to establish different behaviors for different groups of hosts on a subnet.

    You do not use a /27 netmask on the hosts because the subnet is a /24. You configure the hosts with a /24.

    You use a /27 netmask to easily identify a group of hosts on the subnet with one firewall rule.

    Oh. I see. Squid again.

    Connections to squid are made on LAN.

    Connections out from squid are made from the firewall itself.

    Turn off squid and you will find everything works as you would expect.

  • I checked the outgoing IP with 'what is my ip' - mostly google result.

  • LAYER 8 Netgate

    Turn off squid.

  • With Squid turned off, it works, tried both gateways and it works, but I need squid to work as well….....

  • LAYER 8 Netgate

    Post in the Cache/Proxy forum.

  • Will do  Derelict, thanx very much for your Expert Help…....  :)

Log in to reply