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

    Can I NAT from WAN to OPT1?

    Scheduled Pinned Locked Moved NAT
    5 Posts 3 Posters 2.0k 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.
    • R
      robinBones
      last edited by

      I would like to NAT some traffic from my WAN port to an OPT port.

      Is it possible?

      the NAT screen has no option to choose the internal interface.
      Will it automatically select the correct interface dependent on the IP used?

      1 Reply Last reply Reply Quote 0
      • K
        ktims
        last edited by

        To do this you create a firewall rule that matches the traffic you want to go out OPT1, on the LAN interface, and for the Gateway option select the OPT1 gateway.

        If you want to set up failover to your other WAN, you can read the MultiWAN howto on the doc wiki. The process is similar, you just have to create the failover pool in the load balancer and then use that as the gateway instead.

        1 Reply Last reply Reply Quote 0
        • R
          robinBones
          last edited by

          Thank you for the reply, but I believe it didn't answer my question, or I just didn't understand…

          I have 1 WAN port, and I would like some Nat'd traffic to hit a DMZ on OPT.

          Sounds like you were talking about 2 WANS...

          1 Reply Last reply Reply Quote 0
          • K
            ktims
            last edited by

            In that case, then you're right, and I believe this will work with an AoN rule specified, but it's not a configuration I've used or tested.

            Sorry for the confusion. In my opinion NAT is a kludge that you should never need to use on an internal network, and one that should be avoided whenever possible, so I just never thought at all about using it on the LAN/DMZ.

            1 Reply Last reply Reply Quote 0
            • GruensFroeschliG
              GruensFroeschli
              last edited by

              I did setups like this (although only temporary as a workaround).
              Yes you can enable AoN and create a rule to NAT traffic from the WAN to an OPT.

              More importantly: Why do you need that, and what is your goal?

              In my setup i had to access a manageable switch, but it wasn't possible to set a default gateway on this switch.
              With this workaround (it's sometimes called "source NAT") it was possible to access the switch, since the visible source was the pfSense –> in the same subnet --> directly reachable without a default gateway.

              We do what we must, because we can.

              Asking questions the smart way: http://www.catb.org/esr/faqs/smart-questions.html

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