The DNS service is a complex service on the Linux platform. a simple DNS service is now configured. for details, see the following. I. install DNS components 1, rpm-ivhbind * 2, rpm-ivhcaching-nameserver-9.3.3-10.el5 2, copy the template configuration file, and modify the configuration file 1, enter such...
The DNS service is a complex service on the Linux platform. a simple DNS service is now configured. for details, see the following.
1. install DNS components
1. rpm-ivh bind *
2, rpm-ivh caching-nameserver-9.3.3-10.el5
2. copy the template configuration file and modify the configuration file
1. go to the following Directory: cd/var/named/chroot/etc.
2. copy the template cp-p name. caching-nameserver.conf named. conf
3. modify the global configuration file vim named. conf.
Listen-on port 53 {any;} changed 127.0.0.1 to any, which indicates listening on any port allow-query {any;} and modifying it to any, which allows queries by any host.
Match-client {any,} is changed to any to match any master
4. modify the region configuration file and add the "contoso.com" and "0.168.192.in-addr. arpa" statements to the view tab. this statement can also be written in the named. rfc1912.zones file.
View localhost_resolver {
Match-clients {localhost ;};
Match-destinations {localhost ;};
Recursion yes;
Zone "contoso.com" IN {
Type master;
File "contoso.com. zone ";
};
Zone "0.168.192.in-addr. arpa" IN {
Type master;
File "192.168.0.zone ";
};
Include "/etc/named. rfc1912.zones ";
};
3. copy the forward resolution template and modify the forward resolution file
1. go to the forward resolution template configuration file
Cd/var/named/chroot/var/named
2. copy the forward parsing template file
Cp-p named. zero contoso.com. zone
3. edit the forward resolution template file
Vim contoso.com. zone
Add the following record to the last row
Www in a 192.168.0.105
[Root @ mail named] # cat contoso.com. zone
$ TTL 86400
@ In soa localhost. root. localhost .(
42; serial (d. adams)
3 H; refresh
15 M; retry
1 W; expiry
1D); minimum
In ns localhost.
Mail in a 192.168.0.106
Www in a 192.168.0.105
4. copy the reverse resolution template and modify the reverse resolution file
1. go to the reverse resolution template configuration file
Cd/var/named/chroot/var/named
2. copy the reverse resolution template file
Cp-p named. local 192.168.0.zone
3. edit the reverse resolution configuration file
Vim 192.168.0.zone
Modify the last two rows
In ns contoso.com
106 in ptr mail.contoso.com
[Root @ mail named] # cat 192.168.0.zone
$ TTL 86400
@ In soa localhost. root. localhost .(
1997022700; Serial
28800; Refresh
14400; Retry
3600000; Expire
86400); Minimum
In ns contoso.com.
106 in ptr mail.contoso.com.
5. restart the named service and view the log
Service named restart
Tail-f/var/log/message
6. configure the client
[Root @ mail named] # cat/etc/resolv. conf
; Generated by/sbin/dhclient-script
Search contoso.com
Nameserver 192.168.0.106
7. test the DNS server
[Root @ mail named] # host mail.contoso.com
Mail.contoso.com has address 192.168.0.106
[Root @ mail named] # host 192.168.0.106
106.0.168.192.in-addr. arpa domain name pointer mail.contoso.com.
This article is from the "Ms-HowTO" blog