# Force All DNS Queries Through PiHole with OpenWRT

**URL:** <https://discourse.pi-hole.net/t/force-all-dns-queries-through-pihole-with-openwrt/77137>\
**Category:** Community Help\
**Created:** [February 27, 2025, 7:11pm UTC](https://discourse.pi-hole.net/t/force-all-dns-queries-through-pihole-with-openwrt/77137 "2025-02-27T19:11:47Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![doable7322](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/d/7ab992/32.png) [@doable7322](https://discourse.pi-hole.net/u/doable7322)\
**Post date:** [February 27, 2025, 7:11pm UTC](https://discourse.pi-hole.net/t/force-all-dns-queries-through-pihole-with-openwrt/77137/1 "2025-02-27T19:11:48Z")

</div>

Hi, I followed this guide exactly.

> **[Force All DNS Queries Through PiHole with OpenWRT](https://jeff.vtkellers.com/posts/technology/force-all-dns-queries-through-pihole-with-openwrt/)**
>
> Force All DNS Queries Through PiHole with OpenWRT

With both pihole and openwrt.

it does not work.

any suggestions?

i get 98% blocked testing from the rpi4 ad block test and 34% on my android.

> **[AdBlock Tester: test your AdBlock extensions](https://adblock-tester.com/)**
>
> Website with ads, analytics trackers, metrics, error catchers. Check your blocker: AdBlock, AdBlock Plus, AdGuard, Ghostery, uBlock Origin, AdBlocker Ultimate…

something isnt right, so i tried this guide see if it helps adblocking on the droid, still at 34pts.

also in the guide dig response on rpi4 is hitting 1.1.1.1@53 not in the way it should as in screenahot.

 ![Screenshot_20250227-130437_1](https://discourse.pi-hole.net/uploads/default/original/3X/5/1/5193e234cdec4ea94e465787ede3348bfdabf1a6.png)  
 ![Screenshot_20250227-130544_1](https://discourse.pi-hole.net/uploads/default/original/3X/2/e/2e812f8ada9d7ac29948c9cee0008c66843f3e98.png)  
 ![Screenshot_20250227-130745](https://discourse.pi-hole.net/uploads/default/original/3X/2/7/272cbd10d191cf8bba712547a3d57047d4ac1248.png)

 ![Screenshot_20250227-131750_1](https://discourse.pi-hole.net/uploads/default/original/3X/3/5/35389cf05283f5fe1225d6e7160a24823661e6a7.png)

---

<div class="post-metadata">

**Author:** ![Ladrien](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/ladrien/32/39018_2.png) [@Ladrien](https://discourse.pi-hole.net/u/Ladrien)\
**Post date:** [February 27, 2025, 7:28pm UTC](https://discourse.pi-hole.net/t/force-all-dns-queries-through-pihole-with-openwrt/77137/2 "2025-02-27T19:28:34Z")

</div>

> [@doable7322](#):
>
> Hi, I followed this guide exactly.

I am not a fan of masquerading network traffic unless you _really_ know what you are doing. It complicates things, and often leads to incorrect assumptions. For example, in your `nslookup` screenshot, it says that you are asking google's DNS for your local pi-hole. Google should not have any clue what that IP is, but because of the masquerading, it forwards to your pi-hole and it _looks like_ google responded.

If I may, try the steps outlined [here](https://discourse.pi-hole.net/t/do-individual-devices-require-configuration-with-pihole-unbound/77092/2) instead. Of course, you'll want to make sure that your DHCP server is issuing out your pi-hole's IP as the network's DNS server.

> [@doable7322](#):
>
> i get 98% blocked testing from the rpi4 ad block test and 34% on my android.

This may be due to IPv6 traffic from your phone. You'll need to perform the same port-forwarding/blocking steps on the IPv6 firewall. This is a speculation, however.

---

<div class="post-metadata">

**Author:** ![buntspexxt](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/b/e9bcb4/32.png) [@buntspexxt](https://discourse.pi-hole.net/u/buntspexxt)\
**Post date:** [February 27, 2025, 7:40pm UTC](https://discourse.pi-hole.net/t/force-all-dns-queries-through-pihole-with-openwrt/77137/3 "2025-02-27T19:40:43Z")

</div>

1. The Adblock tester does not help you with firewall problems
2. If you redirect all DNS related traffic you have to do it **completely** (for ip4/6)

- DNS / Port 53 (UDP und TCP)
- DNS-over-HTTPS (DoH) / Port 443 (TCP)
- DNS-over-TLS (DoT) / Port 853 (TCP)  
Then you need an application to answer the requests.  
or

1. Block ports (53, 443, 853) and the application will use your dns server (for ip4/6)
2. the difference in blocking is normally related in different plugins in browers, or protocol or ....

---

<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:** [February 27, 2025, 7:50pm UTC](https://discourse.pi-hole.net/t/force-all-dns-queries-through-pihole-with-openwrt/77137/4 "2025-02-27T19:50:46Z")

</div>

> [@doable7322](#):
>
> With both pihole and openwrt.
> 
> it does not work.
> 
> any suggestions?

Yes:  
This isn't about Pi-hole, it's about firewalling.  
Go ask the guy who wrote that guide.

As he wrote it, he is in a far better position to clarify instructions, help you adopting it to your enviroment, and he's the only one who can fix potential mistakes in his guide - just as we would do for Pi-hole issues.

Give him a chance to improve his guide, or your configuration.

---

<div class="post-metadata">

**Author:** ![doable7322](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/d/7ab992/32.png) [@doable7322](https://discourse.pi-hole.net/u/doable7322)\
**Post date:** [February 28, 2025, 12:48am UTC](https://discourse.pi-hole.net/t/force-all-dns-queries-through-pihole-with-openwrt/77137/5 "2025-02-28T00:48:50Z")

</div>

Thank you ppl, i deleted all the rules. if i read correct, it aim't correct.

---

<div class="post-metadata">

**Author:** ![doable7322](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/d/7ab992/32.png) [@doable7322](https://discourse.pi-hole.net/u/doable7322)\
**Post date:** [March 2, 2025, 10:08pm UTC](https://discourse.pi-hole.net/t/force-all-dns-queries-through-pihole-with-openwrt/77137/6 "2025-03-02T22:08:03Z")

</div>

this what i did and tested, setting any device to 8  
8.8.8.8 8 8.8.4.4  
and it works 👍

 ![Screenshot_20250302-160409](https://discourse.pi-hole.net/uploads/default/original/3X/7/6/760a4d162504959586770ae3a21dcd13145e8233.png)  
 ![Screenshot_20250302-160337](https://discourse.pi-hole.net/uploads/default/original/3X/9/d/9d5918e17bbff4c188de246c552d709c3d7e70bb.png)

---

<div class="post-metadata">

**Author:** ![doable7322](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/d/7ab992/32.png) [@doable7322](https://discourse.pi-hole.net/u/doable7322)\
**Post date:** [March 2, 2025, 10:20pm UTC](https://discourse.pi-hole.net/t/force-all-dns-queries-through-pihole-with-openwrt/77137/7 "2025-03-02T22:20:31Z")

</div>

i know its not the rigjt forums but 🤣 8.8.8.8 n  
4.4 blocked 🤣

 ![Screenshot_20250302-161721](https://discourse.pi-hole.net/uploads/default/original/3X/d/5/d5f6e00124b7311ceca63fde896cab5aa43f750a.png)

---

<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 23, 2025, 10:21pm UTC](https://discourse.pi-hole.net/t/force-all-dns-queries-through-pihole-with-openwrt/77137/8 "2025-03-23T22:21:10Z")

</div>

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