# Pi-Hole DNS doesn't work

**URL:** https://discourse.pi-hole.net/t/pi-hole-dns-doesnt-work/41265
**Category:** Community Help
**Created:** [December 5, 2020, 4:21pm UTC](https://discourse.pi-hole.net/t/pi-hole-dns-doesnt-work/41265 "2020-12-05T16:21:38Z")
**Posts on this page:** 17
**Page:** 2

<div class="post-metadata">

### Author: ![tavbi](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/t/e19adc/32.png) [@tavbi](https://discourse.pi-hole.net/u/tavbi)
#### Post date: [December 6, 2020, 4:13pm UTC](https://discourse.pi-hole.net/t/pi-hole-dns-doesnt-work/41265/21 "2020-12-06T16:13:41Z")

</div>

When doing the test, I indeed had a VPN connection enabled. However, suspending the connection doesn't give really different results:

```auto
nslookup pi.hole
Server: homerouter.cpe
Address: 192.168.8.1

*** homerouter.cpe can't find pi.hole: Non-existent domain

```

In this context 192.168.8.1 is my home router, yet it still isn't able to reach the device. I'm was using VPN indeed, however ultimately Pi-Hole is expected to only serve the TV (no baked-in adds and hopefully a little more enjoyable experience when using Youtube) and smartphones (since Add block isn't really available there either). So it isn't mean to be used in connection with VPN. I'm using my computer as the client only to resolve the problem with DNS.

---

<div class="post-metadata">

### Author: ![Bucking\_Horn](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/bucking_horn/32/18719_2.png) [@Bucking\_Horn](https://discourse.pi-hole.net/u/Bucking_Horn)
#### Post date: [December 6, 2020, 4:42pm UTC](https://discourse.pi-hole.net/t/pi-hole-dns-doesnt-work/41265/22 "2020-12-06T16:42:23Z")

</div>

> [@tavbi](#):
>
> ```auto
> nslookup pi.hole
> Server: homerouter.cpe
> Address: 192.168.8.1
> 
> *** homerouter.cpe can't find pi.hole: Non-existent domain
> 
> ```

Your router is distributing itself as DNS server, and only Pi-hole knows how to resolve _pi.hole_.

How did you configure your router to make use of Pi-hole as DNS server?

---

<div class="post-metadata">

### Author: ![tavbi](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/t/e19adc/32.png) [@tavbi](https://discourse.pi-hole.net/u/tavbi)
#### Post date: [December 6, 2020, 6:07pm UTC](https://discourse.pi-hole.net/t/pi-hole-dns-doesnt-work/41265/23 "2020-12-06T18:07:24Z")

</div>

So, it seems that I made a mistake. The nslookup I did before was from the client, but I never changed the network settings to use RPi as the DNS server. Sorry for the confusion.

When changing RPi to be the DNS server, this is the output I get:

```auto
nslookup pi.hole
Server: raspberrypi
Address: 192.168.8.104

Name: pi.hole
Addresses: fd5c:78f8:9326:fe00:2c9a:810d:d9a3:d0f2
          192.168.8.104

```

```auto
nslookup flurry.com 192.168.8.104
Server: raspberrypi
Address: 192.168.8.104

Name: flurry.com
Addresses: ::
          0.0.0.0

```

```auto
nslookup flurry.com 80.241.218.68
DNS request timed out.
    timeout was 2 seconds.
Server: UnKnown
Address: 80.241.218.68

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

```

Note: the only change I did on my router is assign a static IP to my RPi, otherwise it works with default settings. And I only changed the IPv4 settings on my client (PC) to use RPi (192.168.8.104) as the DNS server and no backup DNS server (so it should only rely on RPi).

The above output is wrong since I didn't properly configure my computer before running these commands (since setting RPi as my DNS means I cannot access internet). Sorry for the confusion again!

---

<div class="post-metadata">

### Author: ![Bucking\_Horn](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/bucking_horn/32/18719_2.png) [@Bucking\_Horn](https://discourse.pi-hole.net/u/Bucking_Horn)
#### Post date: [December 6, 2020, 6:15pm UTC](https://discourse.pi-hole.net/t/pi-hole-dns-doesnt-work/41265/24 "2020-12-06T18:15:28Z")

</div>

The first two _`nslookups`_ work as expected now:  
Pi-hole is your client's DNS server, and it is blocking domains as expected.

However, the third _`nslookup`_ should have returned `0.0.0.0`, since the public DNS server queried blocks `flurry.com` as well.

There are routers that redirect DNS traffic to a public server of their likings, and that would normally result in some proper IP addresses for `flurry.com`.

In your case, it would seem that any attempt to access a public DNS server is just timing out.

That would indicate outbound DNS traffic (port 53) is blocked, maybe by your router or by a dedicated firewall in your network.

---

<div class="post-metadata">

### Author: ![tavbi](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/t/e19adc/32.png) [@tavbi](https://discourse.pi-hole.net/u/tavbi)
#### Post date: [December 6, 2020, 6:37pm UTC](https://discourse.pi-hole.net/t/pi-hole-dns-doesnt-work/41265/25 "2020-12-06T18:37:36Z")

</div>

Well, there's no dedicated firewall in my network (aside from Window's firewall and whether a Smart TV has any noteworthy firewall on its own), so I guess it'd boil down to the router in question. I'll have to see if I can find anything useful for the Huawei H122-373 and try it out, since it doesn't seem to be on the side of Pi-Hole anyway ...

---

<div class="post-metadata">

### Author: ![tavbi](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/t/e19adc/32.png) [@tavbi](https://discourse.pi-hole.net/u/tavbi)
#### Post date: [December 8, 2020, 8:58pm UTC](https://discourse.pi-hole.net/t/pi-hole-dns-doesnt-work/41265/26 "2020-12-08T20:58:54Z")

</div>

So, after some days spent tinkering and searching, I found something that might be of value:

> **[5G Broadband Problem Seting Up Port Forwarding/Virtual Server | OmaYhteisö](https://yhteiso.elisa.fi/mobiililaajakaista-8/5g-broadband-problem-seting-up-port-forwarding-virtual-server-517555)**
>
> Sorry for writing in English but unfortunately I don’t speak Finnish well enough for this sort of things. I am trying to set up my home network using a router that I bought from Elisa and my new 5G home broadband subscription.The device in question...

It's for a slightly different model, but in a nutshell I suspect the issue at hand might be very similar =\> it's a 5G modem and there any port tinkering might be less-than-simple.

I have tried setting the RPi device in the DMZ, yet that didn't really help. I tried creating a virtual server on the device for port 53, but either the port is not correct, or this setting doesn't work the way it's supposed to.

I'll keep on trying and if I'll find something I'll post it here - perhaps some poor soul will benefit from my work 🙂

---

<div class="post-metadata">

### Author: ![Bucking\_Horn](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/bucking_horn/32/18719_2.png) [@Bucking\_Horn](https://discourse.pi-hole.net/u/Bucking_Horn)
#### Post date: [December 9, 2020, 7:51am UTC](https://discourse.pi-hole.net/t/pi-hole-dns-doesnt-work/41265/27 "2020-12-09T07:51:45Z")

</div>

Your issue is _outbound_ DNS traffic.

The article you've linked is about port forwarding, i.e. _inbound_ traffic arriving at a certain port is fowarded to a certain specific device in your network.

You'd have to consult your router's documentation resources for an option that allows configuration of its firewall for blockling outbound ports. Note that it may not explicitly mention_firewall_ or _port_, but use words like _filtering_ or _service_ instead.

If you cannot find a way to configure it, try to use your router as Pi-hole's **sole** upstream DNS server.

---

<div class="post-metadata">

### Author: ![Coro](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/coro/32/15424_2.png) [@Coro](https://discourse.pi-hole.net/u/Coro)
#### Post date: [December 9, 2020, 9:21am UTC](https://discourse.pi-hole.net/t/pi-hole-dns-doesnt-work/41265/28 "2020-12-09T09:21:23Z")

</div>

> [@Bucking\_Horn](#):
>
> You'd have to consult your router's documentation resources for an option that allows configuration of its firewall for blockling outbound ports.

Maybe also look for DNS rebind protection. We've seen at least once in the past that a device was not allowed to talk to external DNS servers. Because the router had some rules to enforce the router as your DNS server.

Does

```auto
nslookup flurry.com 192.168.8.1

```

work?

If so, you may need to disable all DNS servers in Pi-hole and add your router as a custom one. Or replace your router, whatever is better for you 🙂

---

<div class="post-metadata">

### Author: ![tavbi](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/t/e19adc/32.png) [@tavbi](https://discourse.pi-hole.net/u/tavbi)
#### Post date: [December 9, 2020, 12:48pm UTC](https://discourse.pi-hole.net/t/pi-hole-dns-doesnt-work/41265/29 "2020-12-09T12:48:44Z")

</div>

It seems that there might be something behind that. I tried to add my router as a custom upstream DNS router and it seems to work (at least my Windows client tells me internet works and my Smart TV seems to be quite content with this config). Alas this would probably mean I cannot configure Pi-Hole as a DNS server for the router, but rather rely on a per-device config ... And as for the router - unfortunately I cannot change much more than what I did. Seems like it's either the device manufacturer (Huawei) or the fact that it's a 5G router that makes the options so darn limited ...

Lesson learned, don't go for 5G, ain't worth it.

---

<div class="post-metadata">

### Author: ![Coro](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/coro/32/15424_2.png) [@Coro](https://discourse.pi-hole.net/u/Coro)
#### Post date: [December 9, 2020, 3:48pm UTC](https://discourse.pi-hole.net/t/pi-hole-dns-doesnt-work/41265/30 "2020-12-09T15:48:11Z")

</div>

> [@tavbi](#):
>
> Seems like it's either the device manufacturer (Huawei) or the fact that it's a 5G router that makes the options so darn limited ...

Probably neither nor, it's rather that this has been engineered as an end-user device and a lot of vendors (including Huawei) are of the mindset: The less options, the less a user can break (and we'd need to support). As they're producing devices for the masses, they can live perfectly fine when some of them (even if hundreds) are unsatisfied with their devices and move on to another vendor.

> [@tavbi](#):
>
> this would probably mean I cannot configure Pi-Hole as a DNS server for the router, but rather rely on a per-device config

I cannot really follow on this point right now. If it works when you set the router as custom DNS server, why isn't this a configuration you can just keep? Why any extra configuration on the clients?

---

<div class="post-metadata">

### Author: ![tavbi](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/t/e19adc/32.png) [@tavbi](https://discourse.pi-hole.net/u/tavbi)
#### Post date: [December 9, 2020, 4:01pm UTC](https://discourse.pi-hole.net/t/pi-hole-dns-doesnt-work/41265/31 "2020-12-09T16:01:47Z")

</div>

Perhaps I didn't express myself clearly.

In Pi-Hole I set my router as my upstream DNS. On my computer (and my TV) I manually set my DNS to point to my Pi-Hole. And this solution seems to work without any problems.

However when I tried to set Pi-Hole as my DNS server on my router, everything just broke - which makes sense. My Pi-Hole points to my router and my router points to my Pi-Hole. Not really a vaild solution.

Setting my router as my upstream DNS seems to work perfectly, no drops, I've been having this config for a few hours now and I'm extremely happy with the results. The only thing that irks me is that I am not able to set Pi-Hole as my router's DNS, so all devices connected to my network would be adds free without manually changing DNS config. That would really rock. But even without that, it's still an overall improvement compared to before.

---

<div class="post-metadata">

### Author: ![Bucking\_Horn](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/bucking_horn/32/18719_2.png) [@Bucking\_Horn](https://discourse.pi-hole.net/u/Bucking_Horn)
#### Post date: [December 9, 2020, 7:32pm UTC](https://discourse.pi-hole.net/t/pi-hole-dns-doesnt-work/41265/32 "2020-12-09T19:32:32Z")

</div>

> [@tavbi](#):
>
> My Pi-Hole points to my router and my router points to my Pi-Hole.

It seems you've configured Pi-hole as your router's upstream DNS server then, and that above configuration would indeed close an endless DNS loop.  
However, it was unclear how you did configure your router, since you never actually answered my previous question.

> [@Bucking\_Horn](#):
>
> How did you configure your router to make use of Pi-hole as DNS server?

Note that it may be possible to configure your router to distribute Pi-hole as local DNS server via DHCP, provided your router supports it. That would also be the preferred way to make use of Pi-hole.

But since you mentioned it's just your TV that you want to be filtered by Pi-hole, your current manual setup (without setting up Pi-hole as your router's upstream) seems sufficient.

Being restricted to use your router as Pi-hole's only upstream is not a restriction at all when it comes to Pi-hole's filtering capabilities.  
It may just limit your choice of upstream DNS servers to those that your router allows. 😉

If your router would allow to distribute Pi-hole via DHCP, that would still be the preferred configuration.

---

<div class="post-metadata">

### Author: ![Coro](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/coro/32/15424_2.png) [@Coro](https://discourse.pi-hole.net/u/Coro)
#### Post date: [December 10, 2020, 7:52am UTC](https://discourse.pi-hole.net/t/pi-hole-dns-doesnt-work/41265/33 "2020-12-10T07:52:26Z")

</div>

> [@tavbi](#):
>
> so all devices connected to my network would be adds free without manually changing DNS config. That would really rock.

> [@Bucking\_Horn](#):
>
> Note that it may be possible to configure your router to distribute Pi-hole as local DNS server via DHCP, provided your router supports it.

If it does not support changing the DNS server propagated by the DHCP server, you may still be able to disable the DHCP server altogether on the router. You can then switch to the embedded Pi-hole DHCP server, enable this one and be immediately happy with the default setting. I'm doing this for years, never had a single problem with it.

---

<div class="post-metadata">

### Author: ![tavbi](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/t/e19adc/32.png) [@tavbi](https://discourse.pi-hole.net/u/tavbi)
#### Post date: [December 10, 2020, 12:57pm UTC](https://discourse.pi-hole.net/t/pi-hole-dns-doesnt-work/41265/34 "2020-12-10T12:57:17Z")

</div>

> [@Bucking\_Horn](#):
>
> How did you configure your router to make use of Pi-hole as DNS server?

I didn't. In the end I left the router settings as default, since I couldn't set Pi-hole as the DNS server (before I made it work by setting my router as the upstream DNS), so setting it there was ... yeah, it just brought the whole network down. So I left it as-is and now if I want to manually set Pi-hole as my router's DNS, it makes an endless loop and the whole system gets down again.

> [@Bucking\_Horn](#):
>
> If your router would allow to distribute Pi-hole via DHCP, that would still be the preferred configuration.

Unfortunately my DHCP settings are pretty limited. I basically consists of my router's LAN IP address (192.168.8.1), a toggle to turn on (or off) the DHCP server, DHCP IP range and DHCP lease time (by default set to 1 day). I cannot find an option to distribute Pi-hole via DHCP this way.

> [@Coro](#):
>
> If it does not support changing the DNS server propagated by the DHCP server, you may still be able to disable the DHCP server altogether on the router. You can then switch to the embedded Pi-hole DHCP server, enable this one and be immediately happy with the default setting. I'm doing this for years, never had a single problem with it.

I will probably have to experiment with this and see whether this would work ...

---

<div class="post-metadata">

### Author: ![Coro](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/coro/32/15424_2.png) [@Coro](https://discourse.pi-hole.net/u/Coro)
#### Post date: [December 10, 2020, 1:18pm UTC](https://discourse.pi-hole.net/t/pi-hole-dns-doesnt-work/41265/35 "2020-12-10T13:18:36Z")

</div>

> [@tavbi](#):
>
> a toggle to turn on (or off) the DHCP server

This is the essential component 🙂 You will succeed.

---

<div class="post-metadata">

### Author: ![tavbi](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/t/e19adc/32.png) [@tavbi](https://discourse.pi-hole.net/u/tavbi)
#### Post date: [December 14, 2020, 9:17pm UTC](https://discourse.pi-hole.net/t/pi-hole-dns-doesnt-work/41265/36 "2020-12-14T21:17:57Z")

</div>

A small update after a few days of using Pi-Hole:

It seems that the combination of Pi-Hole's DHCP server + using my router's LAN IP addr. as my upstream DNS server really did the trick. I've had no issues with connectivity, everything seems to be working the way it's supposed to and according to my dashboard ca. 15% of my queries were blocked so far. I've seen a noteworthy drop in adds on every connected client. Many pages are now add-free, some still have some and I'm constantly battling against Youtube (since no add-blocker exists for the TV), though I've seen many threads on this topic and apparently success is mixed to say the least.

I don't know how common are problems like the one I had with the whole DNS configuration, however this solution might hopefully help somebody in the future with their config.

This topic can now be closed, since the original problem has been successfully resolved. Thanks to everyone who took their time to answer in this thread.

Thank you again!

---

<div class="post-metadata">

### Author: ![system](https://discourse.pi-hole.net/uploads/default/original/3X/7/c/7c8792f649eeb921c5d2b4c41564ffa873d9a2b8.png) [@system](https://discourse.pi-hole.net/u/system)
#### Post date: [January 4, 2021, 9:18pm UTC](https://discourse.pi-hole.net/t/pi-hole-dns-doesnt-work/41265/37 "2021-01-04T21:18:00Z")

</div>

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

[Previous page](https://discourse.pi-hole.net/t/pi-hole-dns-doesnt-work/41265.md?page=1)
