New Pi Hole install on Ubutu 16.04 VPS - DNS not resolving

Please follow the below template, it will help us to help you!

Expected Behaviour:

Install Pi Hole on my Open VZ Ubuntu 16.04 VPS and set my WLAN IPV4 DNS server to <SERVER_IP> (with no alternate DNS). I should then be able to at least browse websites or resolve DNS.

Actual Behaviour:

After setting WLAN DNS server on laptop to <SERVER_IP> I can no longer resolve DNS to any website. I can telnet to <SERVER_IP> on port 53 no problem so I'm not blocked my a firewall

Debug Token:

q9ptiri8z4

I found bind9 was pre-installed on my server but I have completely removed that and rebooted several times since. I just can't figure out what I'm doing wrong! Thanks!

Run pihole -d for a debug token, and also run these commands on the laptop:

nslookup pi.hole
nslookup doubleclick.com

Thanks for the suggestion mcat12.

I did provide my token in my original post. This is "q9ptiri8z4". I've also ran the nslookup commands you suggested.

C:\Users****>nslookup pi.hole
DNS request timed out.
timeout was 2 seconds.
Server: UnKnown
Address: <SERVER_IP>

DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
*** Request to UnKnown timed-out

C:\Users*****>nslookup doubleclick.com
DNS request timed out.
timeout was 2 seconds.
Server: UnKnown
Address: <SERVER_IP>

DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
*** Request to UnKnown timed-out

2 DNS queries showed in my web admin page but these were clearly as a result of the debugging:

DNS name queried:
a.collective-media.net.49476.9362.302br.net

Thanks!

Sorry, I must have missed the token. What does ipconfig say your DNS server is?
Try these commands as well:

nslookup pi.hole 89.185.142.168
nslookup doubleclick.com 89.185.142.168

No problem thanks!

ipconfig shows:

DNS Servers . . . . . . . . . . . : 89.185.142.168

I ran those commands and got the following:

C:\Users****>nslookup pi.hole 89.185.142.168
DNS request timed out.
timeout was 2 seconds.
Server: UnKnown
Address: 89.185.142.168

DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
*** Request to UnKnown timed-out

C:\Users****>nslookup doubleclick.com 89.185.142.168
DNS request timed out.
timeout was 2 seconds.
Server: UnKnown
Address: 89.185.142.168

DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
*** Request to UnKnown timed-out

Just not playing ball :frowning:

I have a static IP at home which I've allowed full access to my server (all ports opened).

Totally stumped here. Thanks!

Can you reach http://89.185.142.168/admin? Is this server located in your home network?

Hi again,

That server is external, outside of my home network. I can hit the admin URL no problem. Just no DNS :frowning:

Thanks

Check to see if the server provider (if it's being provided as a service) isn't blocking port 53. That's a common thing to do, to prevent open resolvers.

Hi again,.

Port 53 is definitely open. I have a virtual firewall in front of my server and have allowed access from my home static IP to all ports. I can telnet to port 53 from my laptop without issue.

My laptop's IP address is assigned by my home router. That router is configured to use Google DNS servers, but I just want my laptop to be able to use pi hole as its DNS servers. Is it still OK to use my router as the default gateway?

Thanks!

Yes, the gateway won't interfere in DNS. What is the output of dig pi.hole @89.185.142.168

Hi again. Sorry didn't get looking at this over the weekend! I ran the command on my VPS but not sure if this is correct. My laptop is Windows 10 so dig won't work.

; <<>> DiG 9.10.3-P4-Ubuntu <<>> pi.hole @89.185.142.168
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 10127
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1280
;; QUESTION SECTION:
;pi.hole. IN A

;; ANSWER SECTION:
pi.hole. 300 IN A 89.185.142.168

;; Query time: 0 msec
;; SERVER: 89.185.142.168#53(89.185.142.168)
;; WHEN: Mon Jun 26 20:37:22 BST 2017
;; MSG SIZE rcvd: 52

The very second I sent my primary DNS to 89.185.142.168 it just stops resolving DNS. Fails immediately without any delay :frowning:

Cheers

If Windows client, try below instead of dig:

nslookup pi.hole 89.185.142.168

Hi again,

Ran the command and got the following:

C:\Users****>nslookup pi.hole 89.185.142.168
DNS request timed out.
timeout was 2 seconds.
Server: UnKnown
Address: 89.185.142.168

DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
*** Request to UnKnown timed-out

Thanks

Is there anything in the Pi-hole log when you try the request? If not, then somehow the server isn't getting it. The VPS provider may have a firewall which specifically filters out DNS requests.

Mcat12 you are absolutely spot on!. I double checked my firewall rules and I stupidly didn't spot that I only had rules set up for TCP from my static IP and NOT UDP! D'ohhhhhhhh!!!!

As soon as I added UDP rule it worked like a charm. Dammit sorry for wasting your time but thanks a million for all your help!

Tested on some sites and it is working like a charm. Brilliant!!!!!

Thanks again :slight_smile:

1 Like