All required software bind-9.4.2.tar.gz // required
A required software
Bind-9.4.2.tar.gz // http://www.isc.org/
Wget http://ftp.isc.org/isc/bind9/9.4.2/bind-9.4.2.tar.gz
2. unzip and install
# Tar zxvf bind-9.4.2.tar.gz
# Cd bind-9.4.2
#./Configure -- sysconfdir =/etc
# Make
# Make install
Three main configuration files
# Vim/etc/named. conf
Options {
Directory "/var/named ";
};
Zone "."{
Type hint;
File "named. ca ";
};
Create a configuration Directory
# Mkdir/var/named
Generate the named. ca file
1 configure DNS
# Echo "nameserver 202.99.192.68">/etc/resolv. conf
2. use the DNS mining tool to view the root
# Dig-t NS.
3 generate the named. ca file
# Dig-t NS.>/var/named. ca
4. use RNDC to control servers
Produce rndc configuration file
# Rndc-confgen>/etc/rndc. conf
Show row number
# Cat-n/etc/rndc. conf
Append from line 13 to the end to the named. conf file
# Tail + 13/etc/rndc. conf>/etc/named. conf
Remove the newly added comment
# Vim/etc/named. conf
5. run and test
Run DNS
# Named
Check status
# Rndc status
Configure DNS
# Echo "nameserver 127.0.0.1">/etc/resolv. conf
Test
# Host www.163.com
6. add local and other
# Vim/etc/named. conf
Zone "localhost "{
Type master;
File "named. local ";
};
Zone "test.com "{
Type master;
File "test.com. zone ";
};
# Vim/var/named. local
@ In soa localhost. root (
2008010201; serial
1 H; refresh
15 M; retry
1 W; expire
1D); TTL
In ns @
In a 127.0.0.1
# Vim/var/named/test.com. zone
@ In soa test.com. root (
2008010201; serial
1 H; refresh
15 M; retry
1 W; expire
1D); TTL
In ns ns
In mx 10 mail
Ns in a 10.0.0.8
Www in a 10.0.0.167
Mail in a 10.0.0.168
News in cname www
Reload
# Rndc reload
Seven reverse zones
...
From: wl315 blog