Create account Login Webmail Contact Us



 
Knowledgebase: DNS Questions
How to setup a domain on a nameserver
Posted by admin on 11 September 2009 09:32 PM
Again this can be a tricky question but I'll try to show it to you as basic as possible with examples. First you will install your and open the named.conf (usually in /etc/namedb/ or /usr/local/etc/namedb. You will add your domain (if this is the master nameserver) to the .conf like this:

zone "domain.com" {
type master;
file "/etc/namedb/db.domain.com";
allow-transfer { xx.xx.xx.xx; };
notify yes;
};

If you plan on making a slave server you will replae xx.xx.xx.xx with the ip of that server and if you have more than 1 slave servers you can list them in the following way:

allow-transfer { xx.xx.xx.xx; xx.xx.xx.xx; };

If you don't have a slave server just delete that line entirely and move on.

Once you have added the domain you will need to pico/ee/nano /etc/namedb/db.domain.com and you can use the following example as a guide to make the host file:

$TTL 3600

@ IN SOA ns1.nameserver.com. root.domain.com. (
2004113110 ; Serial
3600 ; Refresh
900 ; Retry
3600000 ; Expire
3600 ) ; Minimum

@ IN NS ns1.nameserver.com.
@ IN NS ns2.nameserver.com.
@ IN A 33.33.33.33
@ IN MX 10 mail.domain.com.

$ORIGIN domain.com.

ns1 IN A 33.33.33.34
ns2 IN A 33.33.33.35

server IN A 33.33.33.33



You can replace domain.com with your domain name and nameserver.com with your nameserver name. If you don't have a nameserver you will need to go to where you have your domain registered and point ns1 and ns2 to two ips on the same server. It does not matter which IPS but it might be good if you assign them to the main IP as far as our service is concerned. Once you get another server or if you already have another server thats where the ns2 will come in handy.

After you have done this you can save both fales and restart the nameserver if it is already started. If it isn't you will need to start it with named -u bind -c /etc/namedb/named.conf
(622 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments: