Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

DNS Quick configuration experiment

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

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

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report