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

    Port forwarding with NAT to internal IP with different default gateway?

    Scheduled Pinned Locked Moved General pfSense Questions
    4 Posts 2 Posters 2.6k 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.
    • P
      peske
      last edited by

      I've expected that if port forwarding is set with enabled NAT (option "Enable (pure NAT)"), destination machine should see PfSense as the source of the incoming traffic, but obviously it is not the case. So since all the traffic forwarded actually arrives having external IP as source - target host must have default gateway set to PfSense IP.

      My question: Is it possible to setup port forwarding such that all forwarded traffic will appear as if it comes from PfSense itself, not from the outside world?

      Pls correct me if I'm wrong but it should be basic concept of NAT. If source address stays unchanged it is routing, not NATing, right?

      Thanks!

      1 Reply Last reply Reply Quote 0
      • P
        peske
        last edited by

        Just to further clarify my question: If source address is not changed anyway, what is the difference between different NAT reflection settings? What is the difference if NAT reflection is enabled or disabled?

        Documentation (https://doc.pfsense.org/index.php/How_can_I_forward_ports_with_pfSense) is not very helpful on the subject:
        "NAT reflection: Allows NAT reflection to be enabled or disabled on a per-port forward basis." Nothing more…

        Thanks again!

        1 Reply Last reply Reply Quote 0
        • johnpozJ
          johnpoz LAYER 8 Global Moderator
          last edited by

          nat reflection is for NAT reflection… Not port forwarding.. What your talking about doing is source natting, which would be done in the outbound nat section.  Just change to manual or hybrid mode and add your nat rule where you use your lan interface vs the wan...

          Pick LAN interface, source of ANY, destination intenral network or IP, translation leave on Interface address.

          An intelligent man is sometimes forced to be drunk to spend time with his fools
          If you get confused: Listen to the Music Play
          Please don't Chat/PM me for help, unless mod related
          SG-4860 24.11 | Lab VMs 2.8, 24.11

          1 Reply Last reply Reply Quote 0
          • P
            peske
            last edited by

            Yep, it solved the problem. Thank you!

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