Port forwarding to an host that have a gateway different than pfSense

  • Hello,

    I have a VM published on Internet with ip and gateway, called Services

    I have created another VM with pfSense and public IP with gateway

    I created a local network where the Services has address and pfSense

    In the pfSense I configured the port forwarding to Services and it doesn't work because the connection arrive to Services with the client IP as source IP, so it responses to the default gateway ( instead to reply back to pfSense (

    Is there a way to let the connection arrive to the Services with the pfSense local IP as the source?

    Thanks a lot,

  • Rebel Alliance Developer Netgate

    You can switch to hybrid or manual outbound NAT and setup a rule to translate the source for traffic going to the server. Then it will appear to originate from the pfSense firewall.

    Alternately, to do it without NAT, depending on the service you might be able to use HAProxy to handle the connections.

  • Hello jimp,

    thank you very much, the new rule works.
    I'll never thought of using outbound rules to change inbound port forwarding.

    All the best,

Log in to reply