Using DNS in PFSense to split traffic based on host request
-
I have tried to research this topic but just get confused by the plethora of information available on DNS in pf. I have two web servers, each with different sites (mainly some of my projects run on IIS and some only on linux) behind a single public IP and NAT configured with pfsense. I have no problems with simple port forwards in pf but what I would like to try and figure out is how to host 2 different web servers on the same IP and split traffic with pf based on a list of hosts on each server. Please don't respond with "run one on a different port". Can anyone give me heads up on where to start with this?
-
You need a reverse proxy for that.
Install varnish package. It's really fast and will also reduce yours servers load.
-
Thank you. I'm trying to figure that out now but wow. Varnish looks more complicated than DNS. All the documentation on it refers to config files no gui. I want point click! LOL
Well I am going to keep trying this but if anyone has any easier ways I'l love to hear them.
Thank you.
-
Can port under "backends" be a list or range? i.e. "43,80,1000" or "40-50"
-
I don't think so.
you can publish only port 80 from varnish and then forward based on hostname or url to local servers on any port.
varnish does not work with ssl yet.
If you need ssl balance, you can use pfsense load balance or haproxy package. Both balance based on ip not in hostname
-
To do not get off topic, you can ask for varnish help on this thread
http://forum.pfsense.org/index.php/topic,38271.0.html