How to redirect custom urls to same local IPs with pfSense
-
![I am very new to PFsense firewall, I am planning to setup the firewall before my webserver in cloud that hosts 3 websites. However, all the three websites are proxied by cloudflare. So my question is it possible to map the public IP of PFsense in cloudflare and inturn PFsense will forward the http requests to webserver accordingly to each website:
- Cloudflare --> PFsense public IP --> site1.com(connected to pfsense through private IP)
2)Cloudflare --> PFsense public IP --> site2.com(connected to pfsense through private IP) - Cloudflare --> PFsense public IP --> site3.com(connected to pfsense through private IP)
If it is possible, please provide me the steps to achieve this, thanks in advance.
- Cloudflare --> PFsense public IP --> site1.com(connected to pfsense through private IP)
-
Should be possible with HAProxy. Check https://www.netgate.com/resources/videos/server-load-balancing-on-pfsense-24.html
-Rico
-
Hey,
Thanks for the detailed video, I have followed the steps and used the template provided in HAproxy to send traffic to same backend server using host names in the ACL, however when I hit the first site for example site1.com, its working fine, but when I hit site2.com, its not working, any idea why this config is not working