-2

When I query my DNS server by the website of the the registry of .com** top-level domains, I can see that my DNS server is found:

Query
Domain: example**.com**
Answer:
Following name-servers have been defined in **NIC DNS for your domain:

1. ns.example**.com**

IP addresses defined for NS servers in **NIC DNS (glue records):

1. ns.example**.com**. *4.*41.2*.1*4
Name Server: "ns.example**.com**"
List of defined name-servers in this name server is SYNC with the list of name-servers which has been defined in **NIC name-server.

List of name-server from this server:

1. ns.example**.com**

SOA detail from this server:

localhost. root.localhost. (
                    2021053002  ; Serial
                    10800   ; Refresh
                    3600    ; Retry
                    604800  ; Expire
                    86400 ) ; Minimum TTL

But on any network, the web browsers are not able to show my website by its example**.com** address.

What are my options to debug my DNS server? Thanks!

user4838962
  • 231
  • 2
  • 14
  • 2
    These are usually much easier to figure out by adding your **full domain name** in an (optionally pseudonymous) question here and/or some automatic checks like https://dnsviz.net/ – anx Jun 20 '21 at 05:04

1 Answers1

0

The server OS is openSUSE Tumbleweed 32-bit and its DNS server was already configured by YAST2. Taking a look at /etc/named.conf indicates the named working directory:

options {

        # The directory statement defines the name server's working directory

        directory "/var/lib/named";

Also /etc/named.conf indicates the zone file relative to the working directory:

zone "example.com" in {
        allow-transfer { any; };
        file "master/example.comXX";
        type master;
};

Before

/var/lib/named/master/example.comXX content was:

$TTL 2d
@               IN SOA          localhost.      root.localhost. (
                                2021062000      ; serial
                                3h              ; refresh
                                1h              ; retry
                                1w              ; expiry
                                1d )            ; minimum

example.com.  IN NS           ns.example.com.
example.com   IN A            4.21.3.12
ns              IN A            4.21.3.12

After

Modified /var/lib/named/master/example.comXX content according to the example here:

https://ubuntu.com/server/docs/service-domain-name-service-dns

New /var/lib/named/master/example.comXX after modification is:

$TTL 2d
@               IN SOA          example.com.  root.example.com. (
                                2021062000      ; serial
                                3h              ; refresh
                                1h              ; retry
                                1w              ; expiry
                                1d )            ; minimum

@       IN NS           ns.example.com.
@       IN A            4.21.3.12
@       IN AAAA         ::1
ns      IN A            4.21.3.12

Having modified the /var/lib/named/master/example.comXX like above, now the website can be browsed by its address.

user4838962
  • 231
  • 2
  • 14
  • if this is a public valid domain, then one name servers will not work. if it's a dev domain then you need also to force ssl – djdomi Jun 20 '21 at 14:16
  • allow-transfer { any; }; ok anyone can duplicate your zone file? great idea ;/ – djdomi Jun 20 '21 at 14:17