Get the App
SLTechnology News&Howtos  ›  Servers  › 

DNS Quick configuration experiment

Shulou Source: shulou.com Published: 2022-06-02 07:21:37 10月01日 Update

DNS Quick configuration Lab DNS Quick configuration Lab:

The DNS program under Linux is bind.x86_64. It is worth noting that the running program is / usr/sbin/named, and the dig tool for testing DNS needs to install the bind-utils.x86_64 package.

Forward parsing:

Primary DNS server ip address: 172.16.252.87

From DNS Service 1 ip address: 172.16.251.65

DNS main configuration file: the main part of / etc/named.conf that needs to be configured

Listen-on port 53 {127.0.0.1; 172.16.252.87;}; / change the listening address allow-query {any;}; / / allow everyone to access dnssec-enable no; / / turn off the security feature dnssec-validation no

Secondary configuration area file: / etc/named.rfc1912.zones

Zone "zc.com" IN {/ / defines a type master; / / type of primary file "zc.com.zone"; / / specifies the region resolution file}

Configuration zone resolution file: / var/named/zc.com.zone

TTL 600 / / set TTL value zc.com. IN SOA zc.com. Nsadmin.zc.com. (/ / fixed format: zone domain name IN type domain administrator domain 2017052301 / / resolution configuration version number 1H / / refresh time 5m / retry time 1W / / expiration time 6H) / / No answer time IN NS dns1.zc.com.// specifies master dns domain name IN NS dns2.zc.com.// specifies slave dns domain name dns1.zc.com. IN A 172.16.252.87 / / defines dns domain name resolution record dns2.zc.com. IN A 172.16.252.87 www.zc.com. IN A 172.16.0.1 web IN CNAME www / / specify domain name alias

Reload the named configuration file:

Rndc reload

Change the native dns server address:

~] # cat / etc/resolv.conf; generated by / sbin/dhclient-script nameserver 172.16.252.87

Check for syntax errors:

# named-checkzone ZONE_NAME ZONE_FILE # named-checkconf

Installation of dig tools:

~] # yum install bind-utile ~] # dig-t A www.zc.com @ 172.16.252.87 / / see the following resolution record; DiG 9.9.4-RedHat-9.9.4-37.el7-t A www.zc.com @ 192.168.1.251;; global options: + cmd;; Got answer:;-> > HEADER

Tags: Configuration file service server zone address domain name subdomain secondary time lab security type meaning tool format program same master-slave host Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Redmi Microsoft Apple Huawei