this is a newbie question and may have been asked in some variation previously which I read but didn't quite understand.
So my scenario is the following:
Currently I am running e.g. a TS3Server und the domain myname.ddns.net . I have to tell my friends/newcomers every time "Hey please connect to myname.ddns.net:12321". .ddns.net is a free domain hosted by no-ip without any further features. I am planning to switch to another provider to get a paid, more serious domain like myname.net and have full control over all DNS records.
My plan then is, instead of saying "Connect to myname.ddns.net:12321" I can say "Hey connect to ts3.myname.net". The same would be with a mail server, cloud server, game server. E.g cloud.myname.net, mail.myname.net etc.
Why is it that regarding how DNS works, I as an individual can't tell the .myname-DNS-Server to ask my OWN private DNS-Server where e.g cloud.myname.net is located?!
I want my own DNS server because many providers limit the amount of sub-domains available and I don't if it's possible to have sub-sub-domains.
Because with Teamspeak I could imagine having my friends connect via ts3.myname.net and have them control e.g. a music bot via musicbot.ts3.myname.net. That's why I want to have full control over how many sub-domains I have.
PS: The comments mention myname.tk which is another domain I registered because I didn't want that .ddns. in the middle of the domain and Freenom which is the company that provides me with myname.tk allows for more sophisticated control over DNS records.
Best Answer
I have what I regard as a fairly straightforward solution, though I'm the first to admit that it is not a high-performance one. Since I am on ADSL, information from my home server is down-loaded at my up-load speeds, so performance is not a primary concern.
myname.Public.Host
in your example).myname.Public.Host
).www.myname.tk/cloud
, though I see no reason that a CNAME record forcloud.myname.tk
can't point to the same address (myname.public.host/cloud/
), though I haven't tried it.myname.public.host/cloud/index.htm
containing the following code (I'm sorry, I can't acknowledge the source of this code, as I've lost the reference):URL=http://myname.Dynamic.DNS:WebCamPort
: my router is able to mapWebCamPort
to80
on the WebCam's IP, and this seems to work well: although I'm using ports, this is completely transparent when the site is accessed aswww.myname.tk/WebCam
.myname.public.host/cloud/index.htm
would transfer you toURL=http://myname.Dynamic.DNS:CloudPort
, etc, and the different ports provide you with a simple way to address the different servers on your intranet.In summary,
cloud.myname.tk
would be forwarded tomyname.Public.Host/cloud/index.htm
and from there transferred tohttp://myname.Dynamic.DNS:CloudPort
and then through the router to your cloud server.As a final note, I at one time had difficulty in finding a reliable dynamic DNS server, so I implemented my own, by running a script every five minutes which checks my home's public IP and, whenever this changes, calls an FTP script to update the
index.htm
files in each of the folders, replacingURL=http://myname.Dynamic.DNS ...
byURL=http://my.pub.IP.addr ...
(this is easy in Linux, but more of a challenge on Windows, where my web server resides).From the length of this answer, you may question its straightforwardness, but each of the stages is pretty simple, and I gradually arrived at this solution step-by-step, and it now works reliably. You should check that you can create the appropriate CNAME record before you do any more work on implementing it.