Jump to content

Domain: 1 IP, 1 Server, Multiple Applications. HELP PLZ

Hi Guys,
so here is where I struggled the last 2 weeks. I have one domain, one server and one public IP but I want to host multiple applications
so for example if I want to connect to my TeamSpeak Server I enter ts.domain.com and for plex you guessed it, plex.domain.com but I need to redirect the client somehow to the right port for each application. I tinkered so far with HTTP Redirect and URL Rewrite but I cant get it to work. Can someone with a little bit more experience help me out.

Thanks for you help in advance :)

PS: I run Windows Server 2016 Datacenter

Link to comment
Share on other sites

Link to post
Share on other sites

You need to use a reverse proxy. For TCP connections and web applications (such as Plex), you can use Nginx. Though you can't run it directly on Windows Server, you would need a VM or Docker or something.

You can also make use of default ports - if TeamSpeak has default port, just open the port in the firewall, direct it to TeamSpeak in NAT and have people use your domain with default port.

 

HTTP redirect/URL rewrite is not going to work for TCP connections (such as TeamSpeak) as HTTP is a separate protocol on top of TCP.

 

Also, TeamSpeak uses quite a bunch of ports, you will need to make sure every port is accessible - https://support.teamspeakusa.com/index.php?/Knowledgebase/Article/View/44/0/which-ports-does-the-teamspeak-3-server-use

HAL9000: AMD Ryzen 9 3900x | Noctua NH-D15 chromax.black | 32 GB Corsair Vengeance LPX DDR4 3200 MHz | Asus X570 Prime Pro | ASUS TUF 3080 Ti | 1 TB Samsung 970 Evo Plus + 1 TB Crucial MX500 + 6 TB WD RED | Corsair HX1000 | be quiet Pure Base 500DX | LG 34UM95 34" 3440x1440

Hydrogen server: Intel i3-10100 | Cryorig M9i | 64 GB Crucial Ballistix 3200MHz DDR4 | Gigabyte B560M-DS3H | 33 TB of storage | Fractal Design Define R5 | unRAID 6.9.2

Carbon server: Fujitsu PRIMERGY RX100 S7p | Xeon E3-1230 v2 | 16 GB DDR3 ECC | 60 GB Corsair SSD & 250 GB Samsung 850 Pro | Intel i340-T4 | ESXi 6.5.1

Big Mac cluster: 2x Raspberry Pi 2 Model B | 1x Raspberry Pi 3 Model B | 2x Raspberry Pi 3 Model B+

Link to comment
Share on other sites

Link to post
Share on other sites

A reverse proxy is what you're after. I have a single static public IP address then a load of services running on different virtual machines. Here's a brief list of some of them:

  1. Plex
  2. Organizr
  3. Monitorr
  4. sonarr
  5. radarr
  6. ombi
  7. nextcloud
  8. hastebin
  9. gitlab
  10. homeassistant
  11. Bookstack wiki

There are probably more but you get the idea. I have a single VM dedicated to being the reverse proxy. So all my traffic is forwarded to this internal IP address then it separates it out and forwards the traffic to where it needs to go. It can be quite a daunting task at first but it gets a bit easier as you go and there are a shed load of tutorials online. 

Link to comment
Share on other sites

Link to post
Share on other sites

35 minutes ago, mtz_federico said:

I would take the lazy route and just point all domains (ts.example.com, plex.example.com) to the same ip and open all of the ports.

That doesn't really work. not unless you add the port to the domain (eg plex.example.com:32400). In which case there is literally no point to using different sub domains because plex.example.com:32400 would go to the same place as ts.example.com:32400

 

Also if services need specific ports to be open, these will need to be open regardless of whether you use a reverse proxy or not. 

Link to comment
Share on other sites

Link to post
Share on other sites

Yea if you register your domain voice.test.com to 192.168.1.27:4327   and web.test.com to 192.168.1.27:433, and so on specifying the port for each and that port redirect from your router knows this delivers to your single server then you will be golden.   Until you hit bottlenecks of course.

 

That really is the most simple way to solve your solution as a consumer.

 

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Grimlakin said:

Yea if you register your domain voice.test.com to 192.168.1.27:4327   and web.test.com to 192.168.1.27:433, and so on specifying the port for each and that port redirect from your router knows this delivers to your single server then you will be golden.   Until you hit bottlenecks of course.

 

That really is the most simple way to solve your solution as a consumer.

 

You can't use port numbers in DNS entries as far as I am aware. 

But if I am wrong, please send a link to where you can because I would like to see that.

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, jkirkcaldy said:

You can't use port numbers in DNS entries as far as I am aware. 

But if I am wrong, please send a link to where you can because I would like to see that.

You are absolutely correct.  Since this isn't for a business use couldn't they just deliver the port information to their users though?  If this were a business solution they they would have multiple external IP's, and an Load balancer with a VIP behind that, where all trafffic could be routed to the specific port on a listening IP and problem solved before it began.   

 

As a single user I think they will need to count on their users being able to specify ports even if they are in  some cases non standard.

 

OR you know set up a little web page where you have instructions on how to connect to the various services you are offering.  Register a single DNS for that and then the users can HTTPS in collect the needed connection info with linked instructions and boom done?

Link to comment
Share on other sites

Link to post
Share on other sites

12 hours ago, Grimlakin said:

You are absolutely correct.  Since this isn't for a business use couldn't they just deliver the port information to their users though?  If this were a business solution they they would have multiple external IP's, and an Load balancer with a VIP behind that, where all trafffic could be routed to the specific port on a listening IP and problem solved before it began.   

 

As a single user I think they will need to count on their users being able to specify ports even if they are in  some cases non standard.

 

OR you know set up a little web page where you have instructions on how to connect to the various services you are offering.  Register a single DNS for that and then the users can HTTPS in collect the needed connection info with linked instructions and boom done?

No, DNS has no real standard way to deliver port information.  There is a SRV flag which contains port info... However, the client application needs to support it, and most network aware applications do not.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×