Linux Red Hat 5 DNS Server multiple labs detailed setup
Required Packages:
? bind-9.3.3-7.el5.i386.rpm
? Provide main procedures and related documents
? bind-utils-9.3.3-7.el5.i386.rpm
? Provides test tools for DNS servers (such as nslookup, dig, etc.)
? bind-chroot-9.3.3-7.el5.i386.rpm
? Provides a spoofed root directory to enhance its security (var/named/chroot/)
? caching-nameserver-9.3.3-7.el5.i386.rpm
? Provide the necessary default configuration file for bind as a cache name server
Environment:
The VMware virtual machine Red Hat 1 and the Red Hat 2 network environment are set to bridge mode, ensuring that the IP that the virtual machine obtains is connected to the host.
Domain Cache server
After the package installation is complete, use the WIM editor to edit the/var/named/chroot/etc/named.caching-nameserver.conf file, and the file changes as follows
Options {\ \ global configuration
Listen-on Port 53 {192.168.11.114;}; \ \ Change here for your own IP
Listen-on-v6 Port 53 {:: 1;}; \\ipv6, there's no discussion here.
Directory "/var/named"; \ \ database Default storage location
Dump-file "/var/named/data/cache_dump.db";
Statistics-file "/var/named/data/named_stats.txt";
Memstatistics-file "/var/named/data/named_mem_stats.txt"; \ \ Some statistical information
Those options should be used carefully because they disable port
Randomization
Query-source Port 53;
QUERY-SOURCE-V6 Port 53;
allow-query {any;}; \ \ What client queries are allowed, any means all
Forward only; \ \ Indicates that the server only makes forward queries
forwarders {\ \ \ \ \ \ Forwarding to the DNS address
114.114.114.114;
223.5.5.5;
};
};
logging {\ \ \ \ I don't care.
Channel Default_debug {
File "Data/named.run";
Severity dynamic;
};
};
Save exit, restart the DNS service with the/etc/init.d/named restart name to take effect
OK, the domain cache server was built successfully, now let us set the DNS for the virtual machine address can be successfully simplified analysis
Master-Slave mode primary domain settings:
In general, I was setting up a DNS server when you need to set up two DNS servers to provide uninterrupted DNS query services, one for the primary domain (master) server and one for the slave domain (slave) server. The slave server itself does not have a database and relies on the master server to synchronize transmissions. Settings are as follows:
Because you do not cache the server so that the global two items are removed
Forward only; \ \ Indicates that the server only makes forward queries
forwarders {\ \ \ \ \ \ Forwarding to the DNS address
114.114.114.114;
223.5.5.5;
};
Vim/var/named/chroot/etc/named.rfc1912.zones
Edit this file to set the domain and add the domain to the file as follows
Zone "WJLMZ.VV" in {
Type master;
File "Wjlmz.vv.zone"; \ \ Domain database file, define it yourself and need to create a new one after completion
Allow-transfer {192.168.11.117;};
};
Enter/var/named/chroot//var/named/random copy of a sample file to perform the modification, note that CP Plus-P retains the original permission settings, of course, if you create a new file you can also use the chmod command to modify permissions, the command is as follows
Cp–p localhost.zone wjlmz.vv.zone \ \ Name defined in the primary domain
Using the editor to modify the Wjlmz.vv.zone file, I modified the following
$TTL 6400
@ in SOA WJLMZ.VV. Root (\ \ Note that there is a point behind vv, where Root refers to the mailbox
2014111101; Serial (d. Adams) \\2014111101 serial number, can be defined, for and from the server synchronization, I here refers to the first revision in 2014.11.11, note is important, each modification must be at least +1 or master and slave can not sync
3H; Refresh
15M; Retry
1W; Expiry
1D); Minimum
In NS @
www in A 192.168.11.114
In AAAA:: 1
WJLMZ.VV. in A 192.168.11.114 \ \ Note the back point
OK save and restart named service/etc/init.d/named restart
Test Host Settings DNS post-analysis, using the Nslookup tool
WWW.WJLMZ.VV Success 192.168.11.114
WJLMZ.VV Success 192.168.11.114
Build from server:
Slave server IP as specified 192.168.11.117 in the primary domain configuration file named.rfc1912.zones
Global configuration You can view the domain Cache Server Setup section in addition to IP as the master server (master). /named.caching-nameserver.conf
Domain file configuration is similar, you need to create a new domain
Modify the Named.rfc1912.zones file and modify the following
Zone "WJLMZ.VV" in {
Type slave; \ \ This is set to from
File "Slave/wjlmz.vv.zone"; \ \ Domain database file, define it yourself and need to create a new one after completion
Masters {192.168.11.114;}; \ \ Set the IP of the master server
};
Ok, start service/etc/init.d/named restart
Linux Red Hat 5 DNS server build (a) domain name cache server