Score:0

DNS Times out for non-local connections

in flag

I am setting up an email server, nextcloud files server and DNS server on a machine running Ubuntu 20.04. I've used iRedmail for email and it seems to be working correctly. I need to setup the DNS service so that machines on the same network can access correctly the server.

For the DNS configuration I am using BIND9. Below is my named.conf.options

    options {        directory "/var/cache/bind";
        listen-on-v6 { any; };
        version "not currently available";
        recursion yes;  
        querylog yes;
       max-cache-size 30%;
forwarders {
              8.8.8.8;
              8.8.4.4;
         };
        dnssec-validation no;
        auth-nxdomain no;    # conform to RFC1035
allow-recursion { any; };
allow-query { any; };
};

It works correctly when used on the local machine. But does not work when I try to access it from another machine on the network. I have tried disabling the ufw firewall so I don't think the firewall is blocking the DNS requests.

Using

sudo tcpdump  -u port 53

I can see lots of DNS requests coming through including when I request them manually from another machine on the network.

My netstat:

muruadmin@mail:~$ sudo netstat -lnptu | grep namedtcp        0      0 192.168.1.5:53          0.0.0.0:*               LISTEN      63834/named
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      63834/named
tcp        0      0 127.0.0.1:953           0.0.0.0:*               LISTEN      63834/named
udp        0      0 192.168.1.5:53          0.0.0.0:*                           63834/named
udp        0      0 192.168.1.5:53          0.0.0.0:*                           63834/named
udp        0      0 192.168.1.5:53          0.0.0.0:*                           63834/named
udp        0      0 192.168.1.5:53          0.0.0.0:*                           63834/named
udp        0      0 192.168.1.5:53          0.0.0.0:*                           63834/named
udp        0      0 192.168.1.5:53          0.0.0.0:*                           63834/named
udp        0      0 192.168.1.5:53          0.0.0.0:*                           63834/named
udp        0      0 192.168.1.5:53          0.0.0.0:*                           63834/named
udp        0      0 192.168.1.5:53          0.0.0.0:*                           63834/named
udp        0      0 192.168.1.5:53          0.0.0.0:*                           63834/named
udp        0      0 192.168.1.5:53          0.0.0.0:*                           63834/named
udp        0      0 192.168.1.5:53          0.0.0.0:*                           63834/named
udp        0      0 127.0.0.1:53            0.0.0.0:*                           63834/named
udp        0      0 127.0.0.1:53            0.0.0.0:*                           63834/named
udp        0      0 127.0.0.1:53            0.0.0.0:*                           63834/named
udp        0      0 127.0.0.1:53            0.0.0.0:*                           63834/named
udp        0      0 127.0.0.1:53            0.0.0.0:*                           63834/named
udp        0      0 127.0.0.1:53            0.0.0.0:*                           63834/named
udp        0      0 127.0.0.1:53            0.0.0.0:*                           63834/named
udp        0      0 127.0.0.1:53            0.0.0.0:*                           63834/named
udp        0      0 127.0.0.1:53            0.0.0.0:*                           63834/named
udp        0      0 127.0.0.1:53            0.0.0.0:*                           63834/named
udp        0      0 127.0.0.1:53            0.0.0.0:*                           63834/named
udp        0      0 127.0.0.1:53            0.0.0.0:*                           63834/named

So it appears to be listening over port 53.

I've also tried PortQry and have gotten this output:

portqry -n 192.168.1.5 -e 53 -p TCP


Querying target system called:


 192.168.1.5


Attempting to resolve IP address to a name...


Failed to resolve IP address to name


querying...


TCP port 53 (domain service): FILTERED


    
Code:

    

portqry -n 192.168.1.5 -e 53 -p UDP


Querying target system called:


 192.168.1.5


Attempting to resolve IP address to a name...


Failed to resolve IP address to name


querying...


UDP port 53 (domain service): LISTENING or FILTERED


Sending DNS query to UDP port 53...


DNS query timed out

I just don't know why it does not appear to be working. I'm sorry I've tried researching on this and seen this same problem a lot but none of their solutions seems to work for my case.

Thanks

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.