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

    Use same gateway in multiwan by the same company

    Scheduled Pinned Locked Moved Routing and Multi WAN
    15 Posts 5 Posters 4.3k 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.
    • K Offline
      kathampy
      last edited by

      I have a multi-WAN setup which uses the same gateway for both connections from the same ISP. It works fine out of the box.

      1 Reply Last reply Reply Quote 0
      • H Offline
        heper
        last edited by

        it's impossible to do at this time. you'd have to put cheap NAT routers to circumvent this. (using the 'lan" ip of these routers as gateway).
        people saying they have it working, generally haven't noticed that all traffic goes to 1 randomly selected interface that may or not change randomly over time/reboot/…  ;)

        there is only 1 exception: pppoe (xDSL) will work with identical gateways.

        1 Reply Last reply Reply Quote 0
        • S Offline
          Supermule Banned
          last edited by

          Why not use VLAN's and use Outbound NAT to seperate the traffic?? Very easy!

          1 Reply Last reply Reply Quote 0
          • K Offline
            kathampy
            last edited by

            @heper:

            it's impossible to do at this time. you'd have to put cheap NAT routers to circumvent this. (using the 'lan" ip of these routers as gateway).
            people saying they have it working, generally haven't noticed that all traffic goes to 1 randomly selected interface that may or not change randomly over time/reboot/…  ;)

            there is only 1 exception: pppoe (xDSL) will work with identical gateways.

            You can add the same gateway twice on multiple interfaces and setup LAN rules to use a specific gateway.

            If they have only a single ISP interface and a single gateway then it's simply a matter of configuring Manual Outbound NAT with one of the WAN addresses as Virtual IP addresses. Based on the source LAN IP address, pfSense can translate using a different WAN IP address. They would both use a single gateway.

            1 Reply Last reply Reply Quote 0
            • H Offline
              heper
              last edited by

              jimp quote #1:

              Re: Q: 2 WAN with same gateway not possible?
              « Reply #3 on: December 22, 2011, 02:52:40 pm »

              Thanks!

              Both of those links are for multiple gateways that are different (which we already support)

              It is possible with PPPoE in 2.0.1.

              On other types of interfaces, having the same gateway IP/MAC on multiple interfaces will not work as-is, but there are some ideas in the works to try. FreeBSD's support for ECMP is promising, but making that work with pf may be a bit of a challenge, if it's even possible.

              Jimp quote #2

              Re: Multi-WAN with same gateway (2.0-loadbalance)
              « Reply #3 on: January 16, 2012, 05:24:57 pm »

              Thanks!

              It isn't possible on 1.2.3 either. Using the same gateway on multiple interfaces has never been supported in that way.

              1 Reply Last reply Reply Quote 0
              • K Offline
                kathampy
                last edited by

                The second option is still possible. He hasn't told us whether it's two WAN interfaces or 2 IP address on a single interface.

                1 Reply Last reply Reply Quote 0
                • M Offline
                  maykel535
                  last edited by

                  Would be two wan interfaces independent connected to the same switch:

                  1. WAN-1 -> 80.23.4.2 same ISP
                  2. WAN-2 -> 80.23.4.3 same ISP
                  3. WAN Gateway Provider -> 80.23.4.1 same ISP

                  Is possible?

                  INTERNET:

                  LAN1 -> WAN1(80.23.4.2) –> GATEWAY(80.23.4.1) --> Whats my ip? 80.23.4.2
                  LAN2 -> WAN1(80.23.4.3) --> GATEWAY(80.23.4.1) --> Whats my ip? 80.23.4.3

                  Thanks in advanced.

                  1 Reply Last reply Reply Quote 0
                  • K Offline
                    kathampy
                    last edited by

                    If they're both connected to the same switch then you only need one WAN interface. You can add the second IP address as a virtual IP address on the same WAN interface. You can then achieve what you want using Manual Outbound NAT rules.

                    1 Reply Last reply Reply Quote 0
                    • M Offline
                      maykel535
                      last edited by

                      OK, thanks for your response.

                      1. WAN-1 -> 80.23.4.2 same ISP
                      2. WAN-VIRTUAL-IP -> 80.23.4.3 same ISP
                      3. WAN Gateway Provider -> 80.23.4.1 same ISP

                      INTERNET:

                      LAN1 -> WAN1(80.23.4.2) –> GATEWAY(80.23.4.1) --> Whats my ip? 80.23.4.2
                      LAN2 ->  WAN-VIRTUAL-IP(80.23.4.3) --> GATEWAY(80.23.4.1) --> ADD-NAT-OUTBOUND Whats my ip? 80.23.4.3

                      The ip public WAN 80.23.4.3 is now virtual alias ok??

                      The rule nat is automatic or manual??  Attach screenshot.

                      Thanks for all.

                      PFSENSE1.png
                      PFSENSE1.png_thumb
                      PFSENSE2.png
                      PFSENSE2.png_thumb

                      1 Reply Last reply Reply Quote 0
                      • T Offline
                        timthetortoise
                        last edited by

                        If you leave it on automatic, your custom rules will not work. Set it to manual.

                        1 Reply Last reply Reply Quote 0
                        • K Offline
                          kathampy
                          last edited by

                          You should select the WAN interface when creating the rules.

                          In the first rule set the source address to LAN1 subnet and choose translate using WAN interface address.

                          For the second rule set the source address to LAN2 subnet and translate using the virtual IP address.

                          1 Reply Last reply Reply Quote 0
                          • M Offline
                            maykel535
                            last edited by

                            Thank you very much for everything, when I can I will try it because it is the firewall that is in production.

                            Just a question, is dating LAN1 public ip I want correctly, which is the default.

                            It is compulsory / necessary put him 2 rules? one for one for LAN1 and LAN2?? Suffice not only put a single rule for the LAN?

                            Many thanks for your help.

                            1 Reply Last reply Reply Quote 0
                            • K Offline
                              kathampy
                              last edited by

                              You can use any number of LAN interfaces. I just assumed you had one LAN interface per company. You simply need to match the source IP in the NAT rules to control which LAN clients get translated using which public IP address.

                              You need one NAT rule per public IP address.

                              1 Reply Last reply Reply Quote 0
                              • M Offline
                                maykel535
                                last edited by

                                Many thanks!! It works!! Thanks for all.

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