Linode As Nameserver: HowTo? and With GoDaddy?

I have several questions about setting up a linode as a name server.

I want my linode to serve domain names for a site hosted on another, not-linode box. I prefer to configure everything from its command line, rather than use the linode tools, and I'm sure my setup is suboptimal. Right now I'm just trying to learn.

Question 1: I'm using "DNS and Bind", but can anyone point me to resources specific to doing this from a linode?

I'm particularly confused about designating name servers. The domain is registered with GoDaddy. In my primary zone file I've designated name servers nameserver1.example.net and nameserver2.example.net, and given these my linode's IP addresses. I've commented out the default linode nameservers in /etc/resolv.conf. But I don't quite get how to tell GoDaddy that nameserver1 should be a nameserver for example.net – when I enter that domain name in its nameserver designation tool, it (not unreasonably) says that name server hasn't been registered.

I've tried to designate my linode's IP address.

Inspection of syslog doesn't show any errors, so I think my configuration and zone files are okay. So,

Question 2: How do I tell the internet, and in particular GoDaddy, that the linode is the nameserver for example.net?

Thanks in advance.

25 Replies

AFAIK, you need to "register" your nameservers with the appropriate authorities before you can point your domains at it. You can't just create a subdomain, install Bind, and use it as a nameserver. The people who run the Internet want something a little more authoritative.

This is probably something you need to do on GoDaddy's side, and I know that some domain registrars (e.g. eNom/Namecheap) have a link in the user interface for doing exactly that, but I'm not familiar with GoDaddy's interface. Once your nameservers are properly registered, then you will be permitted to point your domains at them.

http://help.godaddy.com/topic/163/article/668

This might be help

Indeed. Thanks very much.

I've tried to "register" the domain names for my namerservers, ie, nameserver1.example.net and nameserver2.example.net, rather than the domain itself (ie, not example.net). Is that right?

It should be.

My opinion is to use linode's dns servers.:roll:

1) Its easy

2) You dont waste your resources.

@chernevik:

Indeed. Thanks very much.

I've tried to "register" the domain names for my namerservers, ie, nameserver1.example.net and nameserver2.example.net, rather than the domain itself (ie, not example.net). Is that right?

Uhh… no, "registering" a nameserver is different from "registering" a domain. You already own the domain, right?

Yes, I do own the domain. I won't ask any further questions just yet, I'm trying to figure this out.

@krmdrms:

My opinion is to use linode's dns servers.

1) Its easy

2) You dont waste your resources.

I'm sure you are right, but I do want to understand the nuts and bolts of this for myself, first. Thanks.

@chernevik:

I've commented out the default linode nameservers in /etc/resolv.conf.

Why would you do that? Breaking your node's recursive DNS setup does not make it easier to set up an authoritative DNS server. They're not related.

I've tried to simplify the problem by making the linode the host for the website, as well as the nameserver. I've also un-commented the default name servers. I've also given the linode the hostname 'workshop' and referred to this name in the zone files.

BIND continues to start without errors, but now when I use nslookup I get "Got SERVFAIL" from the linode nameservers. The request times out before reaching any other servers. I've designated the linode as a name server in resolv.conf, at address 127.0.0.1.

What am I doing wrong here?

What's the FQDN in question? That will help a lot with troubleshooting.

Well, hostname -f reports "hostname: unknown host", as does dnsdomainname. So I have clearly banged up my domain name somehow.

hostname reports "workshop.example.net".

I've edited /etc/hosts to specify

"72.14.xx.xxx workshop.example.net workshop"

and added

"domain example.net"

to /etc/resolv.conf.

I've also revised my zone files to specify a host 'workshop.example.net.' at the linode IP address, and named this host as the nameserver.

I've tried adding "nameserver 0.0.0.0" to resolv.conf, but this doesn't help.

resolv.conf and /etc/hosts just change what your system sees when it tries to resolve something; they don't change anything from the outside world.

It sounds like you might not understand how DNS works, and since you're unwilling to give us enough information to troubleshoot, more specific advice is going to be difficult. Try grabbing a copy of DNS & BIND; this will give you much of the information you need to deploy a DNS infrastructure the right way.

I appreciate your time, but I don't think you've read my posts. I've noted at the top that I'm working from "DNS and BIND", and I gave you the output of "hostname -f" in response to your question about my FQDN – as I understand it, that command is what reports the FQDN.

Thanks for your interest anyway.

Just throwing this comment out there: I transferred 3 domains from GoDaddy to NameCheap for this exact reason. I couldn't figure out a way to "use" my own Linode name server.

I'm not saying that it's impossible to do with GoDaddy but they're web site/control panel is unbelieveably and unnecessarily complicated it may have gotten past me. Once my domains were transfered I clicked 1 link and registered ns1.mydomain.com and ns2.mydomain.com to my 2 Linode IP addresses– it's that simple at NameCheap….

I'm reluctant to blame GoDaddy until the linode setup is passing some basic diagnostics.

For what it's worth, I did a reboot and the FQDN is now being reported as workshop.example.net. The /etc/resolv.conf was overwritten to the linode default, though. Still can't a nslookup for "workshop".

@chernevik:

I appreciate your time, but I don't think you've read my posts. I've noted at the top that I'm working from "DNS and BIND", and I gave you the output of "hostname -f" in response to your question about my FQDN – as I understand it, that command is what reports the FQDN.

FQDN is "fully qualified domain name"; in this case, the hostname plus the domain name for whatever you're trying to add an A record for. So what's the domain that you're working with? All I see is example.net.

The domain is "example.net", though "example" is a plug for the actual domain name. The hostname is workshop. So the FQDN I expect is workshop.example.net, and this is what I'm getting from hostname -f, after a reboot.

With GoDaddy, by the way, it's the "Host Summary" in the Domain Details under their Domain Manager… hit Add, and enter the hostname you want and the IP address, add any other nameservers you have, let it ruminate for some time, and you should be able to add them under Nameservers. You will need a minimum of two.

@chernevik:

The domain is "example.net", though "example" is a plug for the actual domain name.

What is the actual domain name?

The actual domain is practicalhorseshoeing.net

OK, looks like things are pretty OK on GoDaddy's end, and I can see things from the outside world:

$ whois practicalhorseshoeing.net
...
   Domain servers in listed order:
      NAMESERVER1.PRACTICALHORSESHOEING.NET
      NAMESERVER2.PRACTICALHORSESHOEING.NET

$ host nameserver1.practicalhorseshoeing.net
nameserver1.practicalhorseshoeing.net has address 72.14.190.80
Host nameserver1.practicalhorseshoeing.net not found: 3(NXDOMAIN)
$ host nameserver2.practicalhorseshoeing.net
nameserver2.practicalhorseshoeing.net has address 72.14.190.81
Host nameserver2.practicalhorseshoeing.net not found: 3(NXDOMAIN)

… but the zone does look a little wonky:

$ dig practicalhorseshoeing.net @72.14.190.80 axfr

; <<>> DiG 9.5.1-P2 <<>> practicalhorseshoeing.net @72.14.190.80 axfr
;; global options:  printcmd
practicalhorseshoeing.net. 3600    IN  SOA workshop.practicalhorseshoeing.net. ns_admin.practicalhorseshoeing.net.practicalhorseshoeing.net. 2009070001 3600 1800 1440 1800
practicalhorseshoeing.net. 3600    IN  NS  workshop.practicalhorseshoeing.net.
localhost.practicalhorseshoeing.net. 3600 IN A    127.0.0.1
workshop.practicalhorseshoeing.net. 3600 IN A    72.14.190.80
www.practicalhorseshoeing.net. 3600 IN    A   72.14.190.80
practicalhorseshoeing.net. 3600    IN  SOA workshop.practicalhorseshoeing.net. ns_admin.practicalhorseshoeing.net.practicalhorseshoeing.net. 2009070001 3600 1800 1440 1800
;; Query time: 74 msec
;; SERVER: 72.14.190.80#53(72.14.190.80)
;; WHEN: Mon Jul  6 20:31:06 2009
;; XFR size: 6 records (messages 1, bytes 235)

It's live! Anyway, you'll probably want to stick a . after the ns_admin.practicalhorseshoeing.net in the SOA, delete the NS record that's there, and add a couple more records:

  IN NS nameserver1.practicalhorseshoeing.net.
  IN NS nameserver2.practicalhorseshoeing.net.
nameserver1 IN A 72.14.190.80
nameserver2 IN A 72.14.190.81

Bump up the serial and reload the zone and life should be almost good. Then, you can revert your /etc/resolv.conf and /etc/hosts to the way they were before and life should be good. However, your nameserver on 72.14.190.81 doesn't appear to be responding, so you'll probably want to fix that too.

Thanks! But I'm confused.

1. What's wonky about the www entry?

2. I don't see the NS record that should be deleted. Yeah, there is a name server with the host 'workshop', but that's the only server I've got in this set up, so it has to serve names.

3. I don't understand the nameserver records you suggest adding. I thought the format of nameserver records was

[domain] IN NS [nameserver_name.domain], and I've got that; and the format of the host addresses was

[host].[domain] IN A [IP address]

and I've got that. So I'm confused.

4. I know the nameserver on x81 is unresponsive, I'm setting this up with just the one server. At some point I'll have to set up an alias that sends that on to x80.

Thank you for all your helps.

@chernevik:

Thanks! But I'm confused.

1. What's wonky about the www entry?

Nothing, it's just in there :-)

> 2. I don't see the NS record that should be deleted. Yeah, there is a name server with the host 'workshop', but that's the only server I've got in this set up, so it has to serve names.

Generally speaking, the NS records on your domain should match the ones in the parent zone unless there's a good reason otherwise (e.g. shadow masters, etc). Since workshop and nameserver1 are the same IP, there's no good reason to keep an NS record pointing at workshop.

> 3. I don't understand the nameserver records you suggest adding. I thought the format of nameserver records was

[domain] IN NS [nameserver_name.domain], and I've got that; and the format of the host addresses was

[host].[domain] IN A [IP address]

and I've got that. So I'm confused.

With BIND, the domain is optional if you're already within the context of a zone. So, instead of doing:

practicalhorseshoeing.net. IN SOA 1234 blah blah blah
practicalhorseshoeing.net. IN NS nameserver1.practicalhorseshoeing.net.
practicalhorseshoeing.net. IN NS nameserver2.practicalhorseshoeing.net.
nameserver1.practicalhorseshoeing.net. IN A 1.2.3.4
nameserver2.practicalhorseshoeing.net. IN A 4.3.2.1
www.practicalhorseshoeing.net. IN A 1.2.3.4

You can just do:

@ IN SOA 1234 blah blah blah
 IN NS nameserver1
 IN NS nameserver2
nameserver1 IN A 1.2.3.4
nameserver2 IN A 4.3.2.1
www IN A 1.2.3.4

It's been awhile since I've looked it up, but I believe the @ is what "homes" everything to the current zone. (This is handy if, later on in a zone file, you change it with $ORIGIN).

This not only saves typing, but if you have a bunch of domains that need the exact same records, you can use the same zone file and save a LOT of typing!

> 4. I know the nameserver on x81 is unresponsive, I'm setting this up with just the one server. At some point I'll have to set up an alias that sends that on to x80.

Thank you for all your helps.

There's a reason they require a minimum of two nameservers, you know. :-) -rt

Thanks. I've added a record for the domain without the www. prefix, as queries for www.blah worked but those for blah didn't, and taken out the nameserver1 record. I'm avoiding shorthand notation for the time being. And yes, I do need a second name server – this first point of the exercise was educational, and you've been a great help. Thank you.

The solution to the nslookup problem also required revision to /etc/resolv.conf. This had to set the domain to that of the server (rather than the linode default), comment out the "search" directive in the linode default file, and place "nameserver 127.0.0.1" ahead of the linode nameservers. With those edits, nslookup works fine.

Finally, I'll close the loop on my initial question about registering name servers at GoDaddy. I had to first register the hosts and IP addresses of the nameservers (workshop.blah.net and nameserver2.blah.net) in their Host Summary section (with the "add" button). I could then designate these hosts as the name servers. Those hosts' names had to match up with host addresses established in the zone file. GoDaddy wasn't helpful answering questions, but they weren't the problem, and changes to the host registrations and name server designations seemed to happen pretty quickly.

Cool! Looks solid from here.

Once you know what you're looking for, GoDaddy's interface for adding glue isn't too shabby, and it supports IPv6-only records, too. I keep a domain there just for that, alas.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct