** Server can't find xxx.com: NXDOMAIN problems encountered by CentOS

Source: Internet
Author: User
Tags nxdomain

** Server can't find xxx.com: NXDOMAIN problems encountered by CentOS

Dns software named Configuration

Although I configured them step by step
1./etc/named. conf
Listen-on port 53 {127.0.0.1}; changed to listen-on port 53 {any ;};
Allow-query {localhost;}; changed to listen-on port 53 {any ;};

2,
/Etc/named. rfc1912.zones (File introduced in the last line of named. conf)
Add a new domain name resolution at the end of the file.

Zone "a.com" IN {type master; file "named. a"; # Reference allow-update {none ;}; again ;};};

3. Create a file/var/named. a for reference by the code above (that is, the file field does not need to be written to the absolute path)

$TTL 1D@       IN SOA  @ rname.invalid. (                                        0       ; serial                                        1D      ; refresh                                        1H      ; retry                                        1W      ; expire                                        3H )    ; minimum        NS      @        A       127.0.0.1        AAAA    ::1www     A       8.8.8.8

But still cannot start the solution: After excluding systemctl status named, it is found that the named. conf permission is insufficient. So I added permissions.

chown named:named /etc/named.confchown 755 /etc/named.conf

But when I use the command

nslookup a.com

Still start the prompt ** server can't find www.a.com: NXDOMAIN. The resolution cannot be found.

Solution: 1. edit/etc/resolv. conf and add a nameserver 127.0.0.1 line for debugging. 2. Grant/var/named. a permission and restart the service.

chown named:named /etc/named.confchown 755 /etc/named.confservice named restart

The final solution is successful.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.