3
1
I have a domain that points to my ISP assigned IP though a CNAME (cname goes to my noip address incase my ISP decides to change the IP), I would like to route different subdomains to various IP:PORT combinations in the internal networks, but I’m not entirely sure how to accomplish this.
Currently, I have nginx acting as a reverse proxy for several different subdomains, and routing to the appropriate apache server. But I would like to also route subdomains to specific IP:port for non http communication such as RDP or VPN.
The idea is to be able to reach my services using different subdomains instead of using port forwarding to get directed to the correct IP:Port.
I have ClearOS (CentOS6) as a gateway between my network and the internet, would something with iptables work?
The end result should be something like this
- rdp.example.com -> 192.168.1.1:3389
- vpn.example.come -> 192.168.1.5:1194
- www1.example.com -> nginx -> 192.168.1.1:80 (This is already setup)
- www2.example.com -> nginx -> 192.168.1.4:80 (This is already setup)
Can anyone help?