DNS configuration case (onRHEL4)-Linux Enterprise Application-Linux server application information. For details, refer to the following section. Prerequisites:
192.168.1.117 as the master server (configured)
Forward interpretation zone is "saeg.com.cn"
Reverse interpretation zone is "1.168.192.in-addr. arpa"
Port: 53 (open)
Requirements:
192.168.1.2 configure the cache server;
192.168.1.2 configure slave server;
1. Configure the Cache Server
1. You only need to modify the/etc/named. conf file and add the following statement to the file:
Forwarders {192.168.1.117 ;}; // note that "{" has spaces and "}" has spaces.
Forward only;
2. service named restart
Ii. Configure slave server
1. Define the forward/reverse zone of the slave server in the/etc/named. conf file.
Zone "saeg.com.cn" {// Note: The zone name must be the same as that of the master server.
Type slave;
Masters {192.168.1.117 ;};
File "slaves/slave-saeg.com.cn.zone"; // the absolute path of slaves is/var/named/slaves,
}; // You can also change it to an absolute path.
Zone "1.168.192.in-addr. arpa "{
Type slave;
Masters {192.168.1.117 ;};
File "slaves/slave-1.168.192.in-addr.arpa.zone ";
};
Note:
1> the names of the forward and reverse zones on the master and slave servers must be consistent;
2> You can specify relative paths or absolute paths for files on the server;
3> I comment out the parameter in/etc/sysconfig/named.
# ROOTDIR =/var/named/chroot
If not commented out, all zone files are saved in/var/named/chroot/var/named/*. Otherwise
/Var/named /*
At the same time, pay attention to the two directory owners:/var/named/chroot/whose owner is named and/var/named/whose owner is root.
2. open the port
The slave server must be enabled to synchronize data from the master server;
Iptables-a input-p tcp -- sport 53-j ACCEPT; // understand why this is not udp, but tcp
Iptables-a input-p tcp -- dport 53-j ACCEPT;
Iptables save;
Service iptables start;
3. View logs
Tail-f/var/log/messages
Zone saeg.com.cn/IN: transferred serial 42
Transfer of 'saeg .com.cn/IN' from 192.168.1.117 #53:
End of transfer
Or check whether a file is generated.
/Var/named/slaves /..
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service