Home > OS >  CentOS 7 set up enterprise Intranet DNS server, after the restart CentOS 7 cannot resolve the domain
CentOS 7 set up enterprise Intranet DNS server, after the restart CentOS 7 cannot resolve the domain

Time:09-22

Such as: CentOS 7 set up enterprise Intranet DNS server, after the restart CentOS 7 cannot resolve the domain name, such as can't open like baidu, but a network of DNS is normal, such as www.oa.com these can, should do what, where is less senior show just a little, please. Thank you!

Experimental environment is as follows: using Centos7 structures, DNS server, the IP for 192.168.0.13, corporate network domain name: oa.com

The company web site domain name webserver.oa.com, corresponding IP: 192.168.0.14

1. The first installation in Centos7 Bind service (DNS) server, the command is

Yum install bind - y # install DNS service

Systemctl enable named. Service # make the named service on running



2. Modify the configuration files, command is as follows:

Vi/etc/named. Conf



Press ESC to exit, is good to press: wq save out,



3. Restart the named service to make it effective, command: systemctl restart named. Service



4. Set up the firewall rules, 53 ports, customs or DNS cannot provide resolution, because of the firewall centos7 default firewall, we need to close the firewall, open the iptables firewall, and write the rules, the command is as follows:

Systemctl stop firewalld. Service # close firewalld firewall

Yum install # iptables - services installed firewall iptables

Iptables -i INPUT -p TCP -- dport 53 # 53 - j ACCEPT clearance of TCP port

Iptables -i INPUT -p udp 53 -j -- dport ACCEPT udp 53 port # release

Systemctl enable firewall iptables # allows switched on

#/sbin/service iptables save save the firewall configuration, make its after effect,

7. Vi/etc/named. The conf # write zone file



8. Define DNS data file

Vi/var/named/name.oa.com # to create data files



9, and then enter a command to check whether there is an error

Named - checkzone oa.com/var/named/name.oa.com

Systemctl restart named # to restart the DNS service, make the configuration take effect

CodePudding user response:

Forwarders {8.8.8.8; 114.114.114.114; };
In the named. Inside the conf options to join the above configuration, write the other DNS server address

CodePudding user response:

Has been solved I didn't put firewalld set to boot automatically shut down

CodePudding user response:

reference 1st floor zhouchao6 response:
forwarders {8.8.8.8; 114.114.114.114; };
In the named. Inside the conf options to join the above configuration, write the other DNS server address
  • Related