NAT for the same ports to different LAN IPs

Behind pfsense winth one WAN I have two servers.
One webmail ( in LAN IP and one website ( in LAN IP
Both operate on ports 80 and 443.
How do I do NAT? - LAN IP → 80 and 443 - LAN IP → 80 and 443
I understand that I have to use Haproxy but I can’t find a step by step tutorial for the above situation.
Can someone help me with the steps?
I appreciate any help!

I think you’ll have to use a proxy server to do the redirect based on the fqdn. You could use HAProxy in pfSense or set up a standalone proxy server in a DMZ.

I tried. I can’t make them work:
One WAN IP to” - LAN IP → 80 and 443” - LAN IP → 80 and 443
The truth is that I have never used HAProxy and I can’t even find a step by step tutorial exactly on this situation.
Something escapes me and I don’t know what.
I appreciate any help

Have you checked out this video? How To Setup ACME, Let's Encrypt, and HAProxy HTTPS offloading on pfsense - YouTube

1 Like