External web addresses
-
How I would setup sub addresses like vpn.tomwlab.co.uk and plex.tomwlab.co.uk to go to different servers.
So vpn. goes to 192.168.1.5 and plex. goes to 192.168.1.10 - I have added A records to take that address to the external IP of the pfsense firewall but am unsure how to proceed after that bit.
-
If you only have one external IP address, it won't work out of the box.
DNS converts a name to an IP, and if both vpn.tomwlab.co.uk and plex.tomwlab.co.uk point to the same external IP address, you need something extra in the sauce to be able to distinguish between the two.
You basically need a reverse proxy service running on pfSense, so it can respond to the web request, look at the requested header in order to see the requested site name and forward the request to the appropriate server internally. -
Hi
Thanks for that, where could that be configured?
At present I use port forwarding
-
Use the HAProxy package in pfsense itself.
Here's some walkthroughs on setup:
https://blog.devita.co/pfsense-to-proxy-traffic-for-websites-using-pfsense/
https://www.thawes.com/2018/01/configuring-pfsense-haproxy-http-https/
http://nathandarnell.com/haproxy-in-pfsense-as-a-reverse-proxyHere's the documentation:
https://docs.netgate.com/pfsense/en/latest/packages/haproxy-package.htmlHere's the cache/proxy forum topic here with lots of posts:
https://forum.netgate.com/category/52/cache-proxyJeff