A. It is pretty easy to setup nameserver for each domain using BIND. For example, ns1.nixcraft.net and ns2.nixcraft.net can be used as vanity DNS for theos.in domain.
Our sample setup
Your real DNS server | Vanity DNS | IP address for both Real and Vanity servers |
ns1.nixcraft.net | ns1.theos.in | 202.54.1.20 |
ns2.nixcraft.net | ns2.theos.in | 203.51.2.22 |
How do I setup Vanity DNS for theos.in domain?
You need to register ns1.theos.in and ns2.theos.in with your domain service provider or ISP with the following settings:- ns1.theos.in : 202.54.1.20
- ns2.theos.in : 203.51.2.22
# vi named.conf
Append zone as follows, enter:
zone "theos.in" {Save and close the file. Run following command to check named.conf for error:
type master;
file "/etc/bind/zones/master.theos.in";
allow-transfer { 203.51.2.22 };
};
# named-checkconf
Now, create /etc/bind/zones/master.theos.in zone file:
# vi /etc/bind/zones/master.theos.in
Append zone as follows, enter:
$ORIGIN theos.in.Save and close the file. Run zone file validity checking for theos.in, enter:
$TTL 3h
@ IN SOA ns1.theos.in. hostmaster.theos.in. (
2008071801 ; Serial yyyymmddnn
3h ; Refresh After 3 hours
1h ; Retry Retry after 1 hour
1w ; Expire after 1 week
1h) ; Minimum negative caching of 1 hour
; Vanity DNS
@ 86400 IN NS ns1.theos.in.
@ 86400 IN NS ns2.theos.in.
@ 86400 IN MX 10 smtp.theos.in.
; Vanity DNS must point to IP of ns1.nixcraft.net and ns2.nixcraft.net
ns1 86400 IN A 202.54.1.20
ns2 86400 IN A 203.51.2.22
; host stuff
@ 86400 IN A 22.33.11.44
www 86400 IN A 22.33.11.44
ftp 86400 IN A 22.33.11.44
# named-checkzone theos.in /etc/bind/zones/master.theos.in
Sample output:
zone theos.in/IN: loaded serial 2008071801Now just reload bind 9, enter:
OK
# rndc reload
Slave server configuration
Open named.conf on slave server and append following code:zone "theos.in" {Save and close the file. Run following command to check named.conf for error:
type slave;
file "/etc/bind/zones/slave.theos.in";
masters { 202.54.1.20; };
allow-transfer { none; };
};
# named-checkconf
Reload named, enter:
# rndc reload
It may take anywhere from 24-48 hrs to propagate a domain across the internet. You can test your setup with the following command:
$ host -t ns theos.in
Sample output:
theos.in name server ns1.theos.in.
theos.in name server ns2.theos.in.
No comments:
Post a Comment