Linux builds a separated domain name server
Linux builds a separated domain name server
Separation and resolution mainly provides different domain name resolution records according to different clients, and different resolution results are provided when clients from different addresses request to resolve the same domain name.
Content of the experiment:
Three hosts are required, one Linux provides separate parsing services, one client acts as an Internet extranet user, and one client acts as a corporate intranet LAN user.
Linux: intranet ens33 192.168.10.33 Universe 24 extranet ens37 172.25.25.25 Universe 24 domain name address is www.wawa.com
Two clients
Server configuration:
[root@lin10 ~] # yum install-y bind bind-utils installs dns service
[root@lin10 ~] # systemctl stop firewalld turn off the firewall
[root@lin10 ~] # setenforce 0 close selinux
Edit the main profile
[root@lin10 ~] # vi / etc/named.conf
Skip to 52 lines and delete the following four lines (delete at the beginning of zone)
Check the grammar
[root@lin10 ~] # named-checkconf
Edit area profile
[root@lin10 ~] # vi / etc/named.rfc1912.zones
Delete everything at the beginning of zone (or add view configuration to each)
Add the following
[root@lin10 ~] # named-checkconf check syntax
Edit area data profile
[root@lin10 ~] # cd / var/named
Copy the private and public network configuration files from the configuration template
[root@lin10 named] # cp-p named.localhost wawa.con.zone.lan
[root@lin10 named] # cp-p named.localhost wawa.con.zone.wan
Modify intranet files
[root@lin10 named] # vi wawa.con.zone.lan
[root@lin10 named] # vi wawa.con.zone.wan
Start named after that
Go to two clients to verify the effect
Verify the private network segment
Verify the public network segment
The experiment has been successful.