3/02/2011

Install and Config for Slave server DNS

Configure DNS as as Slave Server. It's easy to set up it.

Following example shows an environment that master DNS is "ns.server-linux.info", Slave DNS is "ns.example.info".

[1]    Write config in Zone file on Master DNS.
[root@ns ~]# vi /var/named/server-linux.info.wan

$TTL86400
@INSOAns.server-linux.info. root.server-linux.info. (
# update serial
2007041501;Serial
3600;Refresh
1800;Retry
604800;Expire
86400;Minimum TTL
)
INNSns.server-linux.info.
# add name server
INNSns.example.info.
INA172.16.0.82
INMX 10ns.server-linux.info.

nsINA172.16.0.82

[root@ns ~]# rndc reload
server reload successful

[2]    Config on Slave DNS.
[root@ns ~]# vi /etc/named.conf

# add these lines below
zone "server-linux.info" IN {
type slave;
masters { 172.16.0.82; };
file "slaves/server-linux.info.wan";
};

[root@ns ~]# rndc reload
server reload successful
[root@ns ~]# ls /var/named/slaves
server-linux.info.wan# zone file in master DNS has been just transfered


Set CNAME

     If you'd like to set another name to your Host, define CNAME record in zone file.

[1]    Set CNAME record in zone file.

[root@ns ~]# vi /var/named/server-linux.info.wan

$TTL86400
@INSOAns.server-linux.info. root.server-linux.info. (
# update serial
2007041501;Serial
3600;Refresh
1800;Retry
604800;Expire
86400;Minimum TTL
)
INNSns.server-linux.info.
INA172.16.0.82
INMX 10ns.server-linux.info.

nsINA172.16.0.82
# aliase IN CNAME server's name
ftpINCNAMEns.server-linux.info.

[root@ns ~]# rndc reload
server reload successful

Source(server-world.info)

No comments:

Post a Comment