DNS Set-up: Debian 3.1 / Godaddy / everydns.net
I began to subscribe to Linode in October using the Debian 3.1-stable distribution. I soon installed Apache 2.0 but didn't immediately put any content up. I registered two domain names with Godaddy, but the domains themselves didn't actually exist. Those names were simply "parked" on Godaddy's nameservers.
In December I had a multi-hour session with two of my Perl hacker buddies getting the web server running and getting DNS working. We created named virtual hosts corresponding to the two domain names registered with Godaddy. But we faced problems getting DNS to work for them. We found that we could not simply enter my linode domain name, nor could we enter the virtual hosts. And the Godaddy error messages were not particularly clear.
After blundering about for a while, my friend offered to list my domains on a DNS server that he was already operating. So we entered that server's name as the #1 nameserver in the list at Godaddy. But Godaddy requires at least 2 nameservers, so for the second server we listed another server that he had registered but which actually wasn't a functioning nameserver.
This "took", and for a month there was no problem. Then there came a day when he was moving his server from one physical location to another. The DNS server was off-line and, boom, my two domains could no longer be located on the Internet!
My friend had told me about the 'dig' utility for analyzing domain names and I used that to learn the names of the top-level nameservers overseeing the '.com' and '.net' domains. I hypothesized that if I entered one of those top-level servers as my #2 server at Godaddy, I would be covered.
That approach appeared to work for a week, but ultimately proved flawed. The #2 server wasn't really providing information about my two domains, and when the #1 server at my friend's house encountered problems, my two domains once again could no longer be located.
I began to look in threads in this forum and eventually decided to check out http://www.everydns.net/
1. Create a new account at everydns.net.
2. Go to your Godaddy account. Log in, select "Manage Domains," then select "Set Nameservers." Enter the 4 nameservers listed at everydns. You will be replacing the two Godaddy nameservers where your domain names are currently parked, then creating two additional nameservers. Save your results.
3. Return to everydns.net. Log in. Select "Add new domain (basic)" and follow the instructions. The new domain will appear in a list of your domains; click on it to edit. At this point you will see content like this (there may be some line-wrapping here):
Current Records:
Host Type Value MX TTL Delete
some.yourdomain.com A 64.158.219.4 3600 [delete]
4. What I did then – which may not be the best or the only way to do this -- was to delete the entry for
A
10.000.00.1
… and clicked on "Add Record". I then repeated the process for some.yourdomain.com.
5. I then held my breath for the next hour, waiting to see if the domain names would properly propagate. They did, so I repeated the process for my other registered domain names.
Of all the aspects of setting up a server I have faced since October, getting DNS to work was the most difficult. A lot of my confusion was due to the fact that I've been using the "Debian 3.1 Linux Bible" as my reference, and the type of DNS configuration described therein didn't actually match what happened when I downloaded the Debian package for BIND version 9. I'm not actually certain what, if anything, BIND on my server is actually doing. But at least my two domains are visible and are hosted on stable nameservers. everydns.net is shareware, and I'll definitely be making a contribution.
Jim Keenan
7 Replies
I registered a new name on
I then signed up for an account at
Next I installed bind9 (apt-get install bind9) on my linode server. This would provide the primary dns service. I then edited the /etc/bind/named.conf.local file and added:
zone "example.com" {
type master;
file "/etc/bind/db.com.example";
allow-transfer {
202.157.185.115; // ns1.twisted4life.com
};
};
I then created a file called /etc/bind/db.com.example with the following:
; Zone file for example.com
;
; The full zone file
;
$TTL 86400
@ IN SOA ns.example.com. hostmaster.example.com. (
2006020601 ; Serial
; how often slave nameservers check with the master for changes
7200 ; Refresh
; how often slave nameservers would contact the master
; nameserver if the previous XFER failed
1200 ; Retry
2419200 ; Expire
86400 ) ; Negative Cache TTL
;
NS ns ; inet of our nameserver
NS ns1.twisted4life.com. ; secondary dns
ns A 1.2.3.4 ; my linode service ip address
www CNAME ns
Then I restarted bind9 (/etc/init.d/bind9 restart).
Next was to get the secondary dns transferring from my linode server. I logged into
Great, restarted the bind daemon again on my linode server (/etc/init.d/bind9 restart) and verified in the logs that a zone transfer was happening to ns1.twisted4life.com (check /var/log/syslog on debian).
With that in place I then went to godaddy.com and logged into my account. Now I had to UNLOCK my account first, then go to the "Domain Host Summary" section at the right hand side and add a domain with the name "ns.example.com" with IP address "1.2.3.4" (or whatever your linode service IP is). I LOCKED the account again.
Lastly, while logged into godaddy.com, I clicked "Set Nameservers" and made my 1st "ns.example.com" and the 2nd "ns1.twisted4life.com".
All done! Now to wait 48 hours for the name to propagate around the internet!
Later, you can try visiting
Having your own dns (and using someone else as a secondary) allows you to dynamically update your zone file.
Let's say you have started a car fanclub website, and you called it "myslicksaresoquick.com". Perhaps you offer members a premium service where you give them their own domain that points to a page all about their car, directly! So you write a script that goes into the zone file on your linode system and it adds that member name. Soon after the entire internet knows about your new member's site (e.g. member zoomzoom gets a domain "zoomzoom.myslicksaresoquick.com/" all to himself! Your apache webserver has a URL rewriting rule that takes redirects a user to myslicksaresoquick.com/members/zoomzoom automatically.)
OK so maybe the example above is a bit involved, but it does illustrate the level of control having your own domain server gives you.
The crux of Yahoo! DomainKeys is that you update your zone file to include an entry for xxx._domainkey.yoursite.com where xxx is the selector name.
Then you configure your mailer (exim4 perhaps in which the source has experimental domain keys support) to sign any outgoing mail (with a private key). The recipient of any message then looks up the xxx._domainkey.yoursite.com TXT record for the public key and verifies that your site did indeed send the message.
I've tried this and had Yahoo! mail authenticate outgoing mail, very nice.