Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
Please provide a meaningful title :) –  Adrian Lang Mar 12 '11 at 8:57
add comment

2 Answers 2

up vote 0 down vote accepted

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.

share|improve this answer
    
Thank you. My question is, do I just replace my current mydomain.db file within my etc/bind/domain.db and edit the file to just have the statements for my A Record and MX record and delete all of the rest? Then just restart the network? What files do I need to change out besides this domain.db file? mail IN A 111.111.11.111 mydomain.com. IN A MX 10 mail.mydomain.com. –  Ubuntu User Mar 12 '11 at 20:19
    
Also do I need to do anything with my /etc/resolv.conf file? Currently it has //nameserver 11.22.333.12 //nameserver 11.22.333.13 search mydomain.com nameserver 111.111.11.111 (my ip address) –  Ubuntu User Mar 12 '11 at 20:55
    
@Ubuntu User: I added a suggested transitional db file and info on setting up at GoDaddy. GoDaddy won't use your db file, but you need to enter the information into their web interface. –  BillThor Mar 12 '11 at 21:05
    
@Ubutu User: I would remove the double slashes from the first two nameservers. This will enable your providers nameservers. Add double slashes in front of the last nameserver. That nameserver will fail when you shut down the bind service. –  BillThor Mar 12 '11 at 21:10
    
Thank you. So once I enter the information into Godaddy's control panel and point their SOA to my IP address. My main concern is how can I get my email servers to use mail.mydomain.com so I can then put that into the godaddy's control panel to point to my mail MX record. I noticed in your example, you placed IN MX 10 mail and then followed up with IN TXT "v=spf1 mx -all" Is this where I should potentially be placing --- mail IN A 111.111.11.111 --- followed by another line: mydomain.com. IN A MX 10 mail.mydomain.com. –  Ubuntu User Mar 12 '11 at 22:57
show 9 more comments

You don't need to worry about the SOA record. GoDaddy will take care of that for you. Also you do not need to worry about NS records, as they will also take care of these.

You need only to create the rest of your records.

Reverse DNS will stay at the owner of the IP block. No need to worry about that. This is because reverse DNS is really just normal DNS based on the resource record type PTR and they are placed in an in-addr.arpa zone, which is delegated by the owner of the IP block.

You just need to make sure that you have a forward record (A) matching the reverse. Like so.

11.11.11.11.in-addr.arpa   PTR  my.server.hostname.com # Your providers end
my.server.hostname.com     A    11.11.11.11 # Your end
share|improve this answer
    
What about my mail server and its records? Right now it is set to mail.mydomain.com. for mx 10 with mail IN A my server IP. –  Ubuntu User Mar 12 '11 at 10:46
    
So my zone file: mydomain.com.db file can be pired out with just what you described? So long as on the godaddy side is pointed to my IP address? If you can be more explict .. since I am still learning that would be great. –  Ubuntu User Mar 12 '11 at 10:48
    
so if my ip is 111.222.33.444 and my server name is CDS0135 and my domain is mydomain.com then my records will look like: 111.222.33.444.in-addr.arpa PTR CDS0135.mydomain.com (What is # at my provider end?) then CDS0135.mydomain.com A 111.222.33.444 –  Ubuntu User Mar 12 '11 at 10:56
    
You don't need any PTR records with GoDaddy. The records you have, all of them, except for SOA and NS, you create in the GoDaddy interface. And then you redelegate your domain to GoDaddy's nameservers. And then you're all set. –  Frands Hansen Mar 12 '11 at 12:15
    
You need to ask your IP provider to set the PTR record for your mail server's ip address to point to mail.mydomain.com. They need to resolve as fbh described. Unless you have a globally routeable IPv6 address don't include an AAAA record. An unreachable AAAA record will make you unreachable from some (most) IPv6 capable systems. Unless you have another DNS server, you should use Godaddy to handle your DNS. –  BillThor Mar 12 '11 at 16:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.