Get the App
SLTechnology News&Howtos  ›  Servers  › 

Linux builds a separated domain name server

Shulou Source: shulou.com Published: 2022-06-02 09:04:59 10月01日 Update

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.

Tags: Configuration customer client file domain name service different verification server content region address beginning user network segment syntax experiment check success host Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno macOS Huawei Microsoft Redmi