0

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.

11
  • Are the servers all sharing the same dynamic public IP address? Commented Dec 6, 2017 at 12:54
  • If you can't dynamically update the entries using your DNS provider you will probably not be able to use your dynamic IP. Is there any reason you're not using a DynDNS provider in this case (aside from wanting to really use your own domain)?
    – Seth
    Commented Dec 6, 2017 at 13:09
  • @TwistyImpersonator Yes they do. They are all connected to one router that gets a new IP every 24h from my ISP. Commented Dec 6, 2017 at 14:42
  • @Seth I think I will sooner or later switch to another provider that has dyndns support and pay for a domain. So no there is actually no reason. I have 2 domains. One is a xxx.ddns.net hosted by No-IP which I have to confim every 30 days and doesn't give me full control and the other is myname.tk hosted by Freenom that I only have to confirm once a year. I thought it would be kinda more professional looking not having .ddns. in the domain. NoIP does however support DynDNS which I have used previously when I distinguished hosts by port and not subdomain. Commented Dec 6, 2017 at 14:48
  • @steveroch123 I'm asking if they all have separate public IP addresses. It sounds like the answer is No. Commented Dec 6, 2017 at 14:58

2 Answers 2

1

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.

  • Because I already had it, I used a small web-site on a public host (equivalent to myname.Public.Host in your example).
  • My domain registrar offers a minimal package of domain registration and web-site / e-mail forwarding.
  • I forward my primary domain to the public web-site (myname.Public.Host).
  • I use web-site folders, rather than subdomains to address my home servers, so that (using your example) I would address the cloud server with www.myname.tk/cloud, though I see no reason that a CNAME record for cloud.myname.tk can't point to the same address (myname.public.host/cloud/), though I haven't tried it.
  • I create 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):
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>AFH - Web Server Home</title>
<META HTTP-EQUIV="Refresh" CONTENT="1; URL=http://myname.Dynamic.DNS/cloud">
</head>
<html>
  • This is how I use it, but for my WebCam I use URL=http://myname.Dynamic.DNS:WebCamPort: my router is able to map WebCamPort to 80 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 as www.myname.tk/WebCam.
  • In principle, you can use the same technique, so myname.public.host/cloud/index.htm would transfer you to URL=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 to myname.Public.Host/cloud/index.htm and from there transferred to http://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, replacing URL=http://myname.Dynamic.DNS ... by URL=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.

3
  • Thank you very much I understood everything. But I am still asking myself why this is such a hassle. The way I understand how DNS works is by asking first a root server if it knows the address, which then responds with "Ask a .com-server" which itself responds with "Ask the .myname-server". Why can't I with my server be the next piece in the chain? Commented Dec 7, 2017 at 17:58
  • @steveroch123 - You have two problems which don't tie in with a simple approach. One is Dynamic DNS, the other is having multiple subdomains which need to be routed through the same (variable) IP address. An alternative is to route all traffic to a single server on your intranet: this server examines the target field in each TCP buffer and routes to the appropriate server on your intranet. This is how I understand that public hosting sites support many different web-sites, but I've never needed multiple (sub)domains, so I've never pursued it, though there are probably packages to support it.
    – AFH
    Commented Dec 7, 2017 at 18:15
  • Thank you. Then I will definitely look into your approach. As long as I can provide my friends with an easy way to memorize the names I don't mind rerouting. Commented Dec 7, 2017 at 21:42
0

No. You really need static IPs for the nameservers - otherwise the service will be very unreliable - especially as NS records should be heavily cached - and in your case would require a glue record which needs to be added to the authorities DNS.

That said, I was recently reading that Namecheap offer free nameservers - even if you do not register your domains through them. (The service is called FreeDNS and Ive never used it) You could use them (or another DNS provider) to solve your dynamic IP problem. You could possibly then judicially use cnames in conjunction with a dynamic DNS provider to point the stuff to your home system.

GOTCHA - Be aware that using a CNAME on the domain name root (ie my name.tk) will have unintended consequences - and while this could be used to allow you to run your own nameserver under dynamic DNS it's best avoided.

You must log in to answer this question.

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