Linode As Nameserver: HowTo? and With GoDaddy?
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
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.
This might be help
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?
My opinion is to use linode's dns servers.
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?
@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.
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?
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.
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
Thanks for your interest anyway.
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….
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.
@chernevik:
The domain is "example.net", though "example" is a plug for the actual domain name.
What is the actual domain name?
$ 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.
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.
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.
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.