Dns service
Install first Samba
look at its configuration file and working directory. rpm -qc bind
Where you can see:
/etc/named.conf master configuration file
/etc/named.rfc1912.zones zone configuration file
/var/named/named.ca Locations established by 13 root domain Servers worldwide
forward parsing
To modify the master configuration file:
650) this.width=650; "title=" DNS master configuration file modified. jpg "src=" http://s3.51cto.com/wyfs02/M00/6B/A5/ Wkiol1uzx7ksawe6aae82ovn4mm668.jpg "alt=" Wkiol1uzx7ksawe6aae82ovn4mm668.jpg "/>
To modify a zone configuration file:
650) this.width=650; "title=" DNS zone configuration file modified. jpg "src=" http://s3.51cto.com/wyfs02/M00/6B/A9/ Wkiom1uzxqdts0dcaadh0b0kv74563.jpg "alt=" Wkiom1uzxqdts0dcaadh0b0kv74563.jpg "/>
go to working directory CD /var/named and view ls- l
650) this.width=650; "title=" DNS view working directory. jpg "src=" http://s3.51cto.com/wyfs02/M01/6B/A5/ Wkiol1uzycir0vybaafrzibhrcm203.jpg "alt=" Wkiol1uzycir0vybaafrzibhrcm203.jpg "/>
As you can see, the owner and the Group One is Root one is named .
We now need to create the working file in this working directory that we have just set up in the zone configuration file .Benet.com.zone,. However, if you use a method that is created directly, because the user at this time is Root , it makes both the owner and the group Root , which conflicts with the default owner and group of the working file, which can result in unreadable. Therefore, it should be used at this time Reserved rights copy the method.
CP- P named.localhost benet.com.zone
Then, modify the working file.
650) this.width=650; "title=" DNS modify working file. jpg "src=" http://s3.51cto.com/wyfs02/M02/6B/A9/ Wkiom1uzxwktre0maajryjgh5ho568.jpg "alt=" Wkiom1uzxwktre0maajryjgh5ho568.jpg "/>
The modification becomes this way:
650) this.width=650; "title=" DNS working file modified 2.jpg "src=" http://s3.51cto.com/wyfs02/M01/6B/A5/wKioL1UzyILBJ_ W9aah51zw4pck119.jpg "alt=" Wkiol1uzyilbj_w9aah51zw4pck119.jpg "/>
To open the named service:
650) this.width=650; "title=" DNS opens named service. jpg "src=" http://s3.51cto.com/wyfs02/M01/6B/A9/ Wkiom1uzx03j4oawaabzazawdfa926.jpg "alt=" Wkiom1uzx03j4oawaabzazawdfa926.jpg "/>
shutting down the firewall service iptables stop and Setenforce 0
To your own network card is set to DNS, is to set the machine for DNS resolution, redirected to the network card configuration file.
> redirect , overwrite, replace all content directly.
echo "servername 192.168.28.149" >/etc/resolv.conf
look at the port, TCP agreements and UDP The agreement looks - the case of the port.
NETSTAT-TNL NETSTAT-UNL
Resolving domain Names host www.benet.com
Reverse parsing
Modifying a zone configuration file
650) this.width=650; "title=" DNS reverse Domain name resolution Modify the zone configuration file. jpg "src=" http://s3.51cto.com/wyfs02/M02/6B/A9/ Wkiom1uzx76rr3aaaab-_vrm4t8974.jpg "alt=" Wkiom1uzx76rr3aaaab-_vrm4t8974.jpg "/>
the Benet.com.zone The file is copied directly, as in the previous copy, to keep the county copy.
Cp-p Benet.com.zone benet.com.local
Then edit the file.
Master-Slave DNS synchronization
Now you turn on a virtual machine, install bind package.
Modify the main configuration file, as above, modify the zone configuration file as follows.
650) this.width=650; "title=" DNS master-Slave synchronization on the primary server zone file modification. jpg "src=" http://s3.51cto.com/wyfs02/M00/6B/A5/ Wkiol1uzywot5lenaabyq6jlvoy146.jpg "alt=" Wkiol1uzywot5lenaabyq6jlvoy146.jpg "/>
shut down the firewall, and Sentenforce 0.
Also add from the server address on the master server and add it to the zone configuration file.
650) this.width=650; "title=" DNS master-Slave synchronization on the primary server zone file modification. jpg "src=" http://s3.51cto.com/wyfs02/M00/6B/A5/ Wkiol1uzydzi4lymaabyq6jlvoy525.jpg "alt=" Wkiol1uzydzi4lymaabyq6jlvoy525.jpg "/>
Start the named service from the server and set its native address to DNS in the NIC configuration file.
echo "servername 192.168.28.150" >/etc/resolv.conf
This article from "Beida Jade Bird Linux" blog, declined reprint!
Linux DNS Service