0

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.

PFSense domain forwarding

2 Answers2

0

Instead of relying on PfSense for this, configure your web server to handle multiple domains. This is possible with most web server software; for Apache httpd or Nginx, you can create multiple virtual hosts or server blocks, respectively, each of which is responsible for serving a single domain.

multithr3at3d
  • 259
  • 2
  • 8
0

I have resolved this issue by adding HA Proxy plugin in the PFsense firewall.

1) First Install HAProxy plugin in the firewall in System --> package manager

2) Configure front end server as the WAN IP of the PFsense

3) Configure back end servers with the IP address of the server and port number

Note - configure same backend server IP for as many websites you want