# Everything seems to be fine but dns queries don't go through pi-hole

**URL:** <https://discourse.pi-hole.net/t/everything-seems-to-be-fine-but-dns-queries-dont-go-through-pi-hole/7540>\
**Category:** Help\
**Created:** [February 25, 2018, 3:10pm UTC](https://discourse.pi-hole.net/t/everything-seems-to-be-fine-but-dns-queries-dont-go-through-pi-hole/7540 "2018-02-25T15:10:24Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![enapupe](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/e/a9a28c/32.png) [@enapupe](https://discourse.pi-hole.net/u/enapupe)\
**Post date:** [February 25, 2018, 3:10pm UTC](https://discourse.pi-hole.net/t/everything-seems-to-be-fine-but-dns-queries-dont-go-through-pi-hole/7540/1 "2018-02-25T15:10:24Z")

</div>

## Expected Behaviour:

Perform DNS queries on pi-hole

## Actual Behaviour:

Performing queries on my ISP delegated DNSs

## Debug Token:

dcwv6mxkvi

As you can see, my raspberry (pihole) is the first delegated DNS ip:

 ![05%20PM](https://discourse.pi-hole.net/uploads/default/original/2X/d/d74026ed17f02d49e6c141c421a8bcbdcdabaee5.png)  
But somehow when I run `nslookup` it uses another dns provider:

```auto
➜ ~ nslookup google.com
Server: 2804:7f4:2002:1005::98
Address:	2804:7f4:2002:1005::98#53

Non-authoritative answer:
Name:	google.com
Address: 172.217.30.78

```

ANd here you can see it works, but calls don't go through it

```auto
➜ ~ nslookup google.com 192.168.0.200
Server: 192.168.0.200
Address:	192.168.0.200#53

```

---

<div class="post-metadata">

**Author:** ![DanSchaper](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/danschaper/32/91_2.png) [@DanSchaper](https://discourse.pi-hole.net/u/DanSchaper)\
**Post date:** [February 25, 2018, 3:25pm UTC](https://discourse.pi-hole.net/t/everything-seems-to-be-fine-but-dns-queries-dont-go-through-pi-hole/7540/2 "2018-02-25T15:25:30Z")

</div>

> [@Why should Pi-hole be my only DNS server?](https://discourse.pi-hole.net/t/why-should-pi-hole-be-my-only-dns-server/3376):
>
> Reduced Ad Blocking Capability The main reason you should Pi-hole as your only DNS server is that you will see increased performance in the blocking of ads. If you have two DNS servers (Pi-hole and something else), your network clients may not always query Pi-hole for name resolution. If a query happens to be answered from a non-Pi-hole DNS server, your block lists will not apply (since that DNS server doesn't know about them). All Queries Need To Go Through Pi-hole First Since other DNS serv…

---

<div class="post-metadata">

**Author:** ![enapupe](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/e/a9a28c/32.png) [@enapupe](https://discourse.pi-hole.net/u/enapupe)\
**Post date:** [February 25, 2018, 3:35pm UTC](https://discourse.pi-hole.net/t/everything-seems-to-be-fine-but-dns-queries-dont-go-through-pi-hole/7540/3 "2018-02-25T15:35:21Z")

</div>

I understand, and that's exactly what I'm trying to accomplish: have pi-hole as the only delegated dns.  
I'm not delegating any others:

 ![05%20PM](https://discourse.pi-hole.net/uploads/default/original/2X/c/c7854347f3f3e9e33972a325e09f2af34795cbec.png)

---

<div class="post-metadata">

**Author:** ![enapupe](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/e/a9a28c/32.png) [@enapupe](https://discourse.pi-hole.net/u/enapupe)\
**Post date:** [February 25, 2018, 3:36pm UTC](https://discourse.pi-hole.net/t/everything-seems-to-be-fine-but-dns-queries-dont-go-through-pi-hole/7540/4 "2018-02-25T15:36:25Z")

</div>

Maybe I'll have to use pi-hole own DHCP service.. Because i can't force it to be the only available dns provider

---

<div class="post-metadata">

**Author:** ![jacob.salmela](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jacob.salmela/32/8_2.png) [@jacob.salmela](https://discourse.pi-hole.net/u/jacob.salmela)\
**Post date:** [February 26, 2018, 12:25am UTC](https://discourse.pi-hole.net/t/everything-seems-to-be-fine-but-dns-queries-dont-go-through-pi-hole/7540/5 "2018-02-26T00:25:28Z")

</div>

Use

```auto
scutil --dns

```

and that will show the true order of your resolvers. The GUI is often misleading despite it being set properly. In addition, you probably want to have _only_ the Pi-hole set as your DNS, per the link @DanSchaper provided.

---

<div class="post-metadata">

**Author:** ![enapupe](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/e/a9a28c/32.png) [@enapupe](https://discourse.pi-hole.net/u/enapupe)\
**Post date:** [February 26, 2018, 12:27am UTC](https://discourse.pi-hole.net/t/everything-seems-to-be-fine-but-dns-queries-dont-go-through-pi-hole/7540/6 "2018-02-26T00:27:11Z")

</div>

You are correct:

```auto
➜ ~ scutil --dns
DNS configuration

resolver #1
  search domain[0] : dlinkrouter
  nameserver[0] : fe80::3657:60ff:fe4b:12e0%en0
  nameserver[1] : 2804:7f4:2002:1005::98
  nameserver[2] : 2804:7f4:2002:1005::99
  nameserver[3] : 192.168.0.200
  if_index : 4 (en0)
  flags : Request A records, Request AAAA records
  reach : Reachable, Directly Reachable Address

```

But I don't know how to force pi-hole to be the first/only in that list.

---

<div class="post-metadata">

**Author:** ![jacob.salmela](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jacob.salmela/32/8_2.png) [@jacob.salmela](https://discourse.pi-hole.net/u/jacob.salmela)\
**Post date:** [February 26, 2018, 12:30am UTC](https://discourse.pi-hole.net/t/everything-seems-to-be-fine-but-dns-queries-dont-go-through-pi-hole/7540/7 "2018-02-26T00:30:49Z")

</div>

Yep, so your Pi-hole (192.168.0.200) is actually the last resolver to be queried. Setting it as the only available resolver should fix the issue and force all queries to go through the Pi-hole.

---

<div class="post-metadata">

**Author:** ![enapupe](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/e/a9a28c/32.png) [@enapupe](https://discourse.pi-hole.net/u/enapupe)\
**Post date:** [February 26, 2018, 12:33am UTC](https://discourse.pi-hole.net/t/everything-seems-to-be-fine-but-dns-queries-dont-go-through-pi-hole/7540/8 "2018-02-26T00:33:04Z")

</div>

Thanks!  
Yes, I got that.. I just have no idea how to do it.. maybe it's out of reach?

---

<div class="post-metadata">

**Author:** ![jacob.salmela](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jacob.salmela/32/8_2.png) [@jacob.salmela](https://discourse.pi-hole.net/u/jacob.salmela)\
**Post date:** [February 26, 2018, 12:33am UTC](https://discourse.pi-hole.net/t/everything-seems-to-be-fine-but-dns-queries-dont-go-through-pi-hole/7540/9 "2018-02-26T00:33:46Z")

</div>

From the GUI in your screenshot, you need to highlight the other DNS servers and click the minus sign to remove them.

---

<div class="post-metadata">

**Author:** ![enapupe](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/e/a9a28c/32.png) [@enapupe](https://discourse.pi-hole.net/u/enapupe)\
**Post date:** [February 26, 2018, 12:38am UTC](https://discourse.pi-hole.net/t/everything-seems-to-be-fine-but-dns-queries-dont-go-through-pi-hole/7540/10 "2018-02-26T00:38:28Z")

</div>

Actually they are auto-assigned, I haven't added them.  
I can only do that if I manually configure the dns providers, which misses the point of having pi-hole..

---

<div class="post-metadata">

**Author:** ![enapupe](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/e/a9a28c/32.png) [@enapupe](https://discourse.pi-hole.net/u/enapupe)\
**Post date:** [February 26, 2018, 12:55am UTC](https://discourse.pi-hole.net/t/everything-seems-to-be-fine-but-dns-queries-dont-go-through-pi-hole/7540/11 "2018-02-26T00:55:31Z")

</div>

Right after connecting to the WIFI, I get the following output:

```auto
DNS configuration (for scoped queries)

resolver #1
  search domain[0] : dlinkrouter
  nameserver[0] : 192.168.0.200
  if_index : 4 (en0)
  flags : Scoped, Request A records
  reach : Reachable, Directly Reachable Address

```

But after a while the other resolvers are automatically added..

---

<div class="post-metadata">

**Author:** ![enapupe](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/e/a9a28c/32.png) [@enapupe](https://discourse.pi-hole.net/u/enapupe)\
**Post date:** [February 26, 2018, 1:40am UTC](https://discourse.pi-hole.net/t/everything-seems-to-be-fine-but-dns-queries-dont-go-through-pi-hole/7540/12 "2018-02-26T01:40:40Z")

</div>

After some more tweaking with both routers in the network I was able to set pi-hole as the only resolver. Everything seems to be perfect now.

---

<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:** [March 19, 2018, 1:40am UTC](https://discourse.pi-hole.net/t/everything-seems-to-be-fine-but-dns-queries-dont-go-through-pi-hole/7540/13 "2018-03-19T01:40:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![DanSchaper](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/danschaper/32/91_2.png) [@DanSchaper](https://discourse.pi-hole.net/u/DanSchaper)\
**Post date:** [December 17, 2019, 7:20am UTC](https://discourse.pi-hole.net/t/everything-seems-to-be-fine-but-dns-queries-dont-go-through-pi-hole/7540/14 "2019-12-17T07:20:52Z")

</div>


