Having two subdomains on one public IP address behind pFsense router
Hi there, I have netgate 2100.
Right now I have my subdomain sub1.mydomain.com points to my home static IP.
I have configure "google domains" under services -> dynamic dns clients as such:
I have set up my port forward using firewall -> NAT as follows:
All the above works fine.
Now I want to have sub2.mydomain.com pointing to my static IP address (same as above) but forward it to my second server say 172.16.0.5 irrespective of the ports.
I basically want some software (I remember I have used apache before) where it will examine the header and if sub1.mydomain.com forward to my "internal ip 172.16.0.xx" and if sub2.mydomain.com forward to my "internal ip 172.16.0.yy" irrespective of the ports
Can I do this using pfsense? What is the best practice ?
Any help would be appeciated
SteveITS Galactic Empire
@netboy You can’t forward the same port twice unless using either something like haproxy or an external load balancer.