In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Software to implement DNS: unbound (it seems that bind is more powerful)
Unbound is the DNS software recommended by Red Hat.
Packages for unbound:
Unbound: the main package that implements DNS
Unbound-libs: a necessary library file for domain name resolution
Startup of the unbound service:
Systemctl start unbound
Configuration file for unbound:
/ etc/unbound/unbound.conf # main configuration file
/ etc/unbound/local.d/ #
Line 39 of the / etc/nsswitch.conf # / etc/nsswitch.conf file, "hosts:files dns", specifies the order in which a host is parsed
First look for the local file / etc/hosts, then DNS
/ etc/hosts # Mapping between local IP address and hostname
/ etc/resolv.conf # specify a DNS server for linux clients
Configure firewall to release DNS service
Firewall-cmd-add-service=dns-permanent
Start the unbound service and set up boot:
Systemctl start unbound
Systemctl enable unbound
Configure the firewall
Firewall-cmd-permanent-add-service=dns
Firewall-cmd-reload
Unbound main profile:
/ etc/unbound/unbound.conf
Server:
Interface:xxxx # IP address for listening. Default listener localhost
Access control list; (all hosts are denied by default except localhost)
Access-control: IP address / mask allow # hosts allowed to access
Access-control: IP address / mask refuse # forbidden host
Username: "" # any user can access
Include: / etc/unbound/local.d/*.conf
Local-zone:
Resource record: RR
Remote-control:
Stub-zone:
Forward-zone:
1. The forward and backward parsing files in unbound are merged into one:
Create a new file testyuming.com.conf under / etc/unbound/local.d/, with the following contents:
Local-zone: "testyuming.com." Static
Local-data: "testyuming.com. 86400 IN SOA 768047936.qq.com. Root 1 1D 1H 1W 1H"
Local-data: "testyuming.com. NS www.testyuming.com."
Local-data: "testyuming.com. MX 5 www.testyuming.com."
Local-data: "www.testyuming.com. A 192.168.1.118"
Local-data: "bbs.testyuming.com. A 192.168.1.118"
# local-data-ptr: "192.168.1.118 www.testyuming.com." Reverse parsing paradigm
two。 Use unbound-checkconf to check syntax
3. Restart the unbound service:
Systemctl restart unbound
4. Modify the / etc/resolv.conf file as follows:
Nameserver 192.168.1.118
5.
[root@localhost etc] # host www.testyuming.com
Www.testyuming.com has address 192.168.1.118
Configure to forward only DNS:
1.
Basic settings for the unbound main configuration file:
Interface: 192.168.1.118
Access-control: 0.0.0.0/0 allow
Username: ""
Find module-config in the configuration file
Cancel the comment and change it to module-config: "iterator"
two。
Restart unbound
Systemctl restart unbound
3.
Create a new file bb.conf under / etc/unbound/local.d/, with the following contents:
Forward-zone:
Name: ".
Forward-addr: server IP that can be parsed by DNS
Unbound-control flush domain name # clear cache
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.