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

    Set outbound interface for specific server

    Scheduled Pinned Locked Moved NAT
    4 Posts 3 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.
    • M
      mitch2k
      last edited by

      Hi,

      I have a pfsense setup with 5 (virtual) wan nics and 1 lan nic. I have to use different wan nics because I have to use specific MACs to be able to 'obtain' the IP. The IP's are in the same subnet.

      I have added different servers on the LAN side, and I am able to route the specific LAN IP's to the correct server without problems. The only issue I have, is that when 1 of those server does an outbound request, it always takes the primary wan interface. How can I define the exact outbound interface for each server? For instance server1 should take wan1, server2 should take wan2 etc.

      I tried several approaches:
      VIP's: not possible since the IP is already assigned to the interface
      Outbound NAT: I can't specify the server that should use the outbound interface
      Add extra gateways: not possible because the gateways from my provider are in the same subnet (and so use the same 'external' gateway)

      I am a bit confused, and I think I'm using a wrong approach. Can someone tell me what I should do to accomplish this?

      Thanks!

      1 Reply Last reply Reply Quote 0
      • KOMK
        KOM
        last edited by

        Maybe this? Policy-based routing.

        1 Reply Last reply Reply Quote 0
        • M
          mitch2k
          last edited by

          @KOM:

          Maybe this? Policy-based routing.

          I could be wrong, but I believe for Policy Based Routing you need to add multiple upstream gateways. But I can't do that since all the gateways from my provider are the same for the different IP's, and pfsense does not allow that.

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

            In Outbound NAT you can add manual rules - I would think you can add rules with
            source IP = internal IP of the server
            destination IP = any
            translation address = the public IP you want

            At least that will translate the internal IPs to the desired external ones.
            But I suspect the traffic will still all go out the default interface. Your ISP may or may not accept that???

            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.