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

  • 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?


  • 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!

  • LAYER 8 Global Moderator

    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.

  • Yep, it solved the problem. Thank you!

Log in to reply