Subdomain Port Forward
-
I think this is a port-forward question and haven't been able to find an answer from searching. What I am trying to do is make it so a sub domain of mine can forward to an internal server on a specific port.
I have the sub-domain pointed to my WAN IP:123.46.78.96
test.example.com A Record = 123.46.78.96How do I then say that any traffic coming in from test.example.com should be fowarded to internal IP 192.168.1.54 on port 8080? I can't seem to find how to setup a rule like that saying that traffic coming from a specific subdomain should do X basically.
I appreciate the help in advance.
-
I don't think you can use domain names in port forward or 1:1 NAT rules. but you can NAT (via port forward or 1:1) 123.46.78.96 to 192.168.1.54. Firewall -> NAT. you can also get instructions on http://docs.pfsense.org.
-
You can't NAT by domain name, since NAT works at the IP layer. You could however install a reverse proxy (such as HA Proxy) and have it handle that, since that is one of the things it is designed to do.