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

    Single WAN interface with multiple IP’s

    Scheduled Pinned Locked Moved Routing and Multi WAN
    9 Posts 3 Posters 790 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.
    • S
      simplerandom
      last edited by

      I’ve received 3 IPs from my hosting provider that have the same GW and I initially went down the route of having PFSense use two of them for dedicated interfaces (WAN and OPT1). What I found is that no matter what I tried I could not get outgoing traffic to be identified as the OPT1 IP. Worked great for incoming traffic and being able to create different firewall rules by destination IP.

      How can I accomplish what I’m trying to do? Is it with virtual IPs and a 1:1? If I go that route I’m limited to 1 IP per host/service.

      Thanks in advance for any advise!

      1 Reply Last reply Reply Quote 0
      • dotdashD
        dotdash
        last edited by

        Use advanced outbound nat for the outgoing traffic.

        1 Reply Last reply Reply Quote 0
        • S
          simplerandom
          last edited by

          Thank you! So I’m assuming use a VIP and that will be an option for the outbound NAT?

          1 Reply Last reply Reply Quote 0
          • dotdashD
            dotdash
            last edited by

            Yes. You can select the VIP as the outbound source for particular traffic.

            1 Reply Last reply Reply Quote 0
            • S
              simplerandom
              last edited by

              Thank you so much—I sincerely appreciate the help! I’ll give that a shot this evening and report back.

              1 Reply Last reply Reply Quote 0
              • S
                simplerandom
                last edited by

                Well apparently I'm still doing something wrong. I'll provide more details in the hope that someone can catch my error:

                1. Add additional network card to pfsense that's assigned to the WAN portgroup (esxi) for a total of 2 nics with manual unique MAC addresses from provider.
                2. WAN interface and LAN interface on PFSense. Internet works--firewall rules work etc.
                3. Add virtual IP with correct matching CIDR notation using IP Alias.
                4. change outbound NAT mode to hybrid.
                5. add a mapping from WAN interface, LAN source range (would prefer an individual IP but not an option it appears) with 443 port and specify the VIP specified earlier.

                External Traffic still identified by the other WAN address.

                dotdashD 1 Reply Last reply Reply Quote 0
                • dotdashD
                  dotdash @simplerandom
                  last edited by

                  @simplerandom said in Single WAN interface with multiple IP’s:

                  1. add a mapping from WAN interface, LAN source range (would prefer an individual IP but not an option it appears) with 443 port and specify the VIP specified earlier.

                  A) Use a /32 in the source to specify a host. B) Leave the port blank.

                  S 1 Reply Last reply Reply Quote 0
                  • S
                    simplerandom @dotdash
                    last edited by

                    @dotdash Thanks for helping me out---I still couldn't get it to work but have found the following workaround though it probably isn't the preferred way of doing things.

                    When adding the additional interfaces in ESXi to the PFSense VM, they appear as OPT1 and OPT2 in PFSense even though they use the same gateway etc. I can then assign a LAN firewall rule by the internal IP to use a particular gateway interface for outgoing traffic. It works--still wish I had a better grasp on WHY I couldn't get it to work as I've read in the docs here:

                    https://docs.netgate.com/pfsense/en/latest/book/firewall/methods-of-using-additional-public-ip-addresses.html

                    Thanks again for the help--it's working well currently. I'm incredibly impressed by the seemingly limitless capabilities this platform has!

                    M 1 Reply Last reply Reply Quote 0
                    • M
                      marvosa @simplerandom
                      last edited by marvosa

                      @simplerandom It's not really a "workaround"... the ending result here was you adding 2 additional WAN interfaces... which automatically created gateways that can be used for policy-based routing and also a NAT entry for each interface. You basically went the physical route vs. a virtual one.

                      However, a more streamlined solution (IMO) could've been configured with a single WAN interface using IP Alias VIP's and additional NAT entries.

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