DNS Configuration Help for dedicated hosting server

dns-zonedomain-name-system

I currently have a dedicated server UBUNUT 10.04lts with my own email server, dns server, and web server all running from the same box. I would like to love the DNS services off this box if at all possible and not have my own name servers hosted in my web server.

I was given 5 IP's from the hosting company. The network admin set my server up to be my own DNS server, email server, and web server.

My Domain is at godaddy.com but the DNS is managed on my server.
reverse DNS is set up through my dedicated hosting company as they have their own rDNS server.

I would like to move the DNS back to Godaddy and use their name servers.

My question is around what are the parameters I need to change in my bind zone files?

Currently, my records look like this:

$TTL      604800
@   IN   SOA   CDS0135NS.mydomain.com.  admin.mydomain.com.  {
               20110202
               6044800
               86400
               2419200
               604800  }

;
    IN   NS   ns1.mydomain.com
    IN   NS   ns2.mydomain.com
@   IN   A    111.111.11.111 (my server IP)
@   IN   AAAA ::1
www IN   A    111.111.11.111 (my server IP)
www.mydomain.com.  IN  A   111.111.11.111
ns  IN  A  111.111.11.111
ns1 IN  A  111.111.11.111
ns2 IN  A  111.111.11.111
ns1.mydomain.com   IN  A   111.111.11.111
ns2.mydomain.com   IN  A   111.111.11.111

mail  IN  A  111.111.11.111
mydomain.com.  IN  A  MX   10   mail.mydomain.com.

imap  IN  CNAME  mail
pop   IN  CNAME  mail 
pop3  IN  CNAME  mail
relay IN  CNAME  mail    
smtp  IN  CNAME  mail

Now when I park my DNS with godaddy, they will give me ns1.godaddy.domain.com, ns2.godaddy.domain.com. They told me I would have to go into their control panel and put in my MX record (Which I would assume is my own mail.mydomain.com) and I would point their A record to my IP address of 111.111.11.111 within their control panel. But what do I do with "@ IN SOA CDS0135NS.mydomain.com. admin.mydomain.com." do I leave it alone?

And for my rDNS, do I continue to have it run through my dedicated hosting providers rDNS or should I run that through godaddy? Does my rDNS have anything to do with me changing the DNS hosted provider?

I am new to this and I have been reading as much as I could in the short time, and I have learned through my sys admin person. But he is no longer available so I am kind of on my own to do this.

Thank you.

Best Answer

Your rDNS records will remain with your hosting provider. While they can delegate this, you won't be able to use standard techniques to setup the PTR records with GoDaddy.

I will use example.com for your domain as that is recommended domain for documentation.

Setup your MX for example.com to point to your mail server (mail.example.com). Setup the IP address for mail.example.com as an A record. You can create as many CNAME or A records as you want for this server, but mail is a good general purpose name that can be used in place of all the CNAMES you are using.

If you want to be able to browse example.com, you will need an A record for it. Configure www.example.com as an A record.

Consider setting up TXT records for SPF.

If you have a global IPv6 address block, you can configure IPv6 and add AAAA record in addition to your A records. Otherwise don't setup AAAA records.

GoDaddy will configure the SOA and NS records.

EDIT: Suggested temporary db contents. Use the correct nameservers from GoDaddy, these may be incorrect. Shut down bind after 2 days to a week.

When you move back to GoDaddy you will need to add address records for the domain, www, and mail as well as the MX record. This will have to be done through their web interface. I have added suggested SPF records. The records you need to add start with the first A record which is for your domain.

$TTL       1H
@      IN      SOA   ns1.godaddy.domain.com.  admin.mydomain.com.  {
               2011031200
               3H
               1H
               1W
               1H  }

       IN      NS   ns1.godaddy.domain.com
       IN      NS   ns2.godaddy.domain.com
       IN      A    111.111.11.111
       IN      MX   10   mail
       IN      TXT  "v=spf1 mx -all"

www    IN      A    111.111.11.111
       IN      TXT  "v=spf1 -all"
mail   IN      A    111.111.11.111
       IN      TXT  "v=spf1 A -all"

Once you have this setup try using the host command to check the values from godaddy. Start with host -a mydomain.com ns1.godaddy.domain.com. Also check the www and mail addresses. If they are resolving correctly and showing godaddys nameservers, then everything is setup. It will take a couple of days for any record pointing at your host to age out of DNS cache.

Related Topic