Can't get dns response on public IP

DCowan asked:

I’m trying to set up a DNS server with bind9 on Debain 10.

I can query the server from the local network, but when I try to dig on the server’s public IP, I get connection timed out; no servers could be reached.

The server is a Debian 10 VM in Azure.

Ports 95 and 953 are open in Azure.

$ netstat -lnpu
...
udp        0      0 10.0.1.4:53             0.0.0.0:*                           2991/named          
udp        0      0 127.0.0.1:53            0.0.0.0:*                           2991/named          
udp6       0      0 :::53                   :::*                                2991/named          
...

Thank you!

Edit: I have no idea why I was using port 95. DNS uses port 53.

My answer:


You need to open UDP port 53. Neither 95 nor 953 are used here.


View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.