settings for high-speed DNS
1. Deployment of the environment
Turn on two virtual machines, one as a client and the other as a server
# server-side
Yuminstall bind-y # installation software
Systemctl status named# View status
systemctl start named # Turn on the named service, which is off by default
Small Details: When starting this service will be card, this time you need to randomly move the mouse, and tapping the keyboard, this function is to randomly grab your action, to generate the key. Execute:cat/etc/rndc.key This command to view the build process.
Systemctl Enable Named.service # turn on auto start
firewall-cmd--permanent--add-service=dns # # Add a Firewall service that does not affect the process
Firewall-cmd--reload
Firewall-cmd--list-all # list firewall allow process
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/8A/FB/wKiom1hAD8jDW2xgAAHCLAui850504.png-wh_500x0-wm_3 -wmp_4-s_2389375143.png "title=" image 1.png "alt=" Wkiom1had8jdw2xgaahclaui850504.png-wh_50 "/>
vim/etc/named.conf #named master configuration file
To edit a configuration file:
Systemctl Restart named
Options {
listen-on Port: (any;}; # for all interface open the port
Listen-on-v6 Port 53 {:: 1;};
Directory "/var/named";
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";
allow-query {any;}; # # Answer all the questions
forwarders {172.25.254.250;}; # # Ask an IP that can connect with the outside world . I don't know, who am I to ask.
dnssec-validation No; # #yes change to no
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M00/8A/F7/wKioL1hAD-CA3lkJAAIBxp1W3jI164.png-wh_500x0-wm_3 -wmp_4-s_1820923952.png "title=" image 2.png "alt=" wkiol1had-ca3lkjaaibxp1w3ji164.png-wh_50 "/>
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M01/8A/FB/wKiom1hAD_PT0-AvAAGMktWJ1uA576.png-wh_500x0-wm_3 -wmp_4-s_548405691.png "title=" image 3.png "alt=" wkiom1had_pt0-avaagmktwj1ua576.png-wh_50 "/>
systemctl Restart named # # Restart service
# # Client
Vim/etc/resolv.conf
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/8A/F7/wKioL1hAEAiSjcy3AAC9y56154w688.png-wh_500x0-wm_3 -wmp_4-s_902839678.png "title=" image 4.png "alt=" wkiol1haeaisjcy3aac9y56154w688.png-wh_50 "/>
Test:
Execute command on client:dig www.baidu,com
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M00/8A/FB/wKiom1hAEJ3x9TTHAAIAztfN_ME168.png-wh_500x0-wm_3 -wmp_4-s_2283086626.png "title=" 2016-11-25 13_26_37 screenshot. png "alt=" wkiom1haej3x9tthaaiaztfn_me168.png-wh_50 "/>
####### forward parsing, resolving the domain name to IP
Vim/etc/name.conf
# # Delete forwarders {172.25.254.250;};
Vim/etc/named.rfc1912.zones
Edit:
Zone "Localhost.localdomain" in {
Type master;
File "Named.localhost";
allow-update {none;};
};
Zone "localhost" in {
Type master;
File "Named.localhost";
allow-update {none;};
};
Zone "Westos.com" in {
Type master;
File "Westos.com.zone";
};
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M01/8A/F7/wKioL1hAEMGz0A3QAAFNj0O6zhE831.png-wh_500x0-wm_3 -wmp_4-s_326249417.png "title=" 2016-11-25 13_55_50 screenshot. png "alt=" wkiol1haemgz0a3qaafnj0o6zhe831.png-wh_50 "/>
# Small Details: After the end of the file can see the next need to manipulate the file
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M00/8A/F7/wKioL1hAENjiB2CbAAE6_pdSHrk021.png-wh_500x0-wm_3 -wmp_4-s_2795772096.png "title=" 2016-11-25 13_53_46 screenshot. png "alt=" wkiol1haenjib2cbaae6_pdshrk021.png-wh_50 "/>
Then:cd/var/named/
Cp-p named.localhost Westos.com.zone # # with permission copy
Editing a configuration file
Vim Westos.com.zone
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M02/8A/FB/wKiom1hAEP2AxBnTAADn5K2--fE948.png-wh_500x0-wm_3 -wmp_4-s_3410390711.png "title=" 2016-11-25 14_14_01 screenshot. png "alt=" wkiom1haep2axbntaadn5k2--fe948.png-wh_50 "/>
Description: In dns.westos.com. ( at the back of this "." must add, here's the "." represents the previous configuration file written. westos.com)
Systemctl Restart named # # Restart service
Test
On the client
Dig www.qq,com
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M00/8A/FB/wKiom1hAEUGhhrl-AAHEa-wzrCw731.png-wh_500x0-wm_3 -wmp_4-s_1506512614.png "title=" 2016-11-25 14_07_28 screenshot. png "alt=" wkiom1haeughhrl-aahea-wzrcw731.png-wh_50 "/> 650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M01/8A/F7/wKioL1hAEZfCH1Q4AAGvulkiLmc986.png-wh_500x0-wm_3 -wmp_4-s_816504484.png "title=" 2016-11-25 14_07_35 screenshot. png "alt=" wkiol1haezfch1q4aagvulkilmc986.png-wh_50 "/>
##### Reverse parsing # # # #
Vim/etc/named.rfc1912.zones
Zone "254.25.172.in-addr.arpa" in {
Type master;
File "Westos.comnanr";
allow-update {none;};
};
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M00/8A/F7/wKioL1hAEfXjbOOTAAFJk-j-0qY214.png-wh_500x0-wm_3 -wmp_4-s_701743505.png "title=" 2016-11-25 14_37_46 screenshot. png "alt=" wkiol1haefxjbootaafjk-j-0qy214.png-wh_50 "/>
cd/var/named/
Cp-p Named.loopback Westos.com.ptr
Vim Westos.com.ptr
650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/8A/F7/wKioL1hAEk-j_gXGAADZvjhgIWw587.png-wh_500x0-wm_3 -wmp_4-s_4099037087.png "title=" 2016-11-25 14_41_03 screenshot. png "alt=" wkiol1haek-j_gxgaadzvjhgiww587.png-wh_50 "/>
Test:
On the server side
650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M02/8A/FB/wKiom1hAEnmxdGUiAAHYHl2xpCQ327.png-wh_500x0-wm_3 -wmp_4-s_4069040625.png "style=" Float:none; "title=" 2016-11-25 14_41_55 screenshot. png "alt=" Wkiom1haenmxdguiaahyhl2xpcq327.png-wh_50 "/>
650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M02/8A/FB/wKiom1hAEnrDMQolAAHcFyc_pkA319.png-wh_500x0-wm_3 -wmp_4-s_959290540.png "style=" Float:none; "title=" 2016-11-25 14_41_59 screenshot. png "alt=" wkiom1haenrdmqolaahcfyc_ Pka319.png-wh_50 "/>
Linux Nineth Week Lesson notes (2) high-speed DNS