2

I have a service running on a specific port on a given ip : 12.34.56.78:12345. The server at this IP address is all mine (but not the network, so no switch/router tweaking), and I also have a bunch of domains and DNS server I could use.

Is there a way to build a "shortcut" for this IP:port adress that would be easier for users to remember ? The IP part is not the problem (I can use the domain instead) but the port is.

Ideally, something like a mappting service.mydomain.com => 12.34.56.78:12345 would be perfect, but this is AFAIK not possible.

EDIT: as it seems this was unclear, my question is not targeted to HTTP traffic, but for a TeamSpeak server. Thus, users need to enter 12.34.56.78:12345 in their client when setting things up, and I was wondering if there was a way to make this easier.

4 Answers 4

0

Could you run a "bookmarks" webpage somewhere that has a clickable link with the full Hostname/Port in a anchor tag ie: <a href="protocol://hostname:port">My link</a> to make it easier for users? This only works if the browser or the OS shell has a handler for that URI protocol. (There are instructions online on how to create protocol handlers in Windows Shell)

Mark

0
2

You can use apache's mod_proxy to transparently proxy traffic from a "standard" port 80 URL through to your app listening on :12345.

3
  • Could you elaborate on that ? Does this mean I could setup a virtual host to redirect traffic on ts.mydomain.com to mydomain.com:12345 ?
    – Wookai
    Dec 3, 2009 at 22:07
  • It wouldn't be a redirect, but rather a true proxy. You'd set up a vhost in apache (say app.example.com) with mod_proxy enabled and configured to proxy traffic through to the "real" URL of the application. Then when someone enters app.example.com in their browser, the traffic will go through the apache vhost, to the real app and back along the same path. Just google mod_proxy, there's a ton of documentation out there on it.
    – EEAA
    Dec 3, 2009 at 23:02
  • Oh, I see your edit now, specifying that this is for TS, not HTTP. In this case, mod_proxy won't help you at all.
    – EEAA
    Dec 3, 2009 at 23:03
1

Your "impossible" assumption is right in the context of protocols that use hostnames and not URLs.

A hostname is just a mapping of name to IP address. No application-layer information (TCP ports, etc) is conveyed in a hostname. You're conflating the URL syntax of "protocol://hostname:port" with just hostnames that non-URL-based protocols use.

SRV records are supposed to solve this kind of problem, but very few protocols use SRV RR's to resolve the protocol endpoints. (Which is a shame, really...)

In the context of a the HTTP protocol, you could used a name-based virtual host to do what you're talking about, but then your "port 12345" wouldn't be needed anyway, since name-based virtual hosts exist for the purpose of allowing you to run multiple web server instances on a single IP address and TCP port (typically the well-known HTTP port, 80).

3
  • Thanks for your detailed answer. Unfortunately, the service I was thinking about is a Teamspeak server. Instead of telling users to connect on mydomain.com:14534, I'd better tell them ts.mydomain.com. But it's not that important...
    – Wookai
    Dec 3, 2009 at 21:36
  • I'm not familiar with TeamSpeak. From what I'm reading, I'm unclear if you're talking about something the user is going to put in their browser, or if you're talking about the server they specify in the TeamSpeak client. Dec 3, 2009 at 21:54
  • Sorry if I was not clear. I'm talking about the server address they will put in their client.
    – Wookai
    Dec 3, 2009 at 22:10
0

When you say shortcut, do you want a simple desktop shortcut to an IP address that opens in a web browser? Try this, I created a shortcut on my laptop to 192.168.1.1 (common default router address) by simply adding http to it (http://192.168.1.1)

If you want it to open in Windows File Explorer, try this: \\12.34.56.78:12345 where xxx is the address of the server.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .