Port forwarding to an host that have a gateway different than pfSense
I have a VM published on Internet with ip 184.108.40.206 and gateway 220.127.116.11, called Services
I have created another VM with pfSense and public IP 18.104.22.168 with gateway 22.214.171.124
I created a local network 192.168.1.0/24 where the Services has address 192.168.1.10 and pfSense 192.168.1.1
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 (126.96.36.199) instead to reply back to pfSense (192.168.1.1).
Is there a way to let the connection arrive to the Services with the pfSense local IP as the source?
Thanks a lot,
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.
thank you very much, the new rule works.
I'll never thought of using outbound rules to change inbound port forwarding.
All the best,