DNS setup steps:
1. Design the mapping between domain name and IP address. Here, I use zhanqiang.net and 192.168.1.110;
2. Check if BIND(Berkeley Internet Name Domain) has been installed: rpm -qa | grep bind
3. Add some lines in /etc/named.conf
change
=======================================
zone "0.in-addr.arpa" IN {
- type master;
file "named.zero";
allow-update { none; };
include "/etc/rndc.key";
=======================================
to
=======================================
zone "0.in-addr.arpa" IN {
- type master;
file "named.zero";
allow-update { none; };
zone "zhanqiang.net" IN {
- type master;
file "zhanqiang.net.zone";
allow-update { none; };
include "/etc/rndc.key";
=======================================
4. create and edit /var/named/zhanqiang.net.zone
=======================================
$TTL 86400
@ IN SOA dns.zhanqiang.net. root.zhanqiang.net. (
- 1997022700 ; Serial
28800 ; Refresh
7000 ; Retry
1800000 ; Expire
86400 ) ; Minimum
- 1997022700 ; Serial
@ IN NS dns.zhanqiang.net.
@ IN MX 10 dns.zhanqiang.net.
dns IN A 192.168.1.110
www IN CNAME dns
=======================================
5. restart named(DNS) service: service named restart
6. check firewall if the port 53 has been blocked;
7. run neat or edit /etc/resolve.conf for changing the network card DNS setting in order to use the DNS service in 192.168.1.110
8. test the DNS with ping, host, and nslookup commands
Now it is done.
No comments:
Post a Comment