# Option to block/not forward all AAAA queries

**URL:** https://discourse.pi-hole.net/t/option-to-block-not-forward-all-aaaa-queries/34837
**Category:** Implemented
**Created:** [June 24, 2020, 12:27pm UTC](https://discourse.pi-hole.net/t/option-to-block-not-forward-all-aaaa-queries/34837 "2020-06-24T12:27:17Z")
**Posts on this page:** 20
**Page:** 2

<div class="post-metadata">

### Author: ![yubiuser](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/yubiuser/32/12100_2.png) [@yubiuser](https://discourse.pi-hole.net/u/yubiuser)
#### Post date: [June 24, 2020, 4:59pm UTC](https://discourse.pi-hole.net/t/option-to-block-not-forward-all-aaaa-queries/34837/21 "2020-06-24T16:59:39Z")

</div>

It will reduce upstream network traffic.

---

<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: [June 24, 2020, 5:07pm UTC](https://discourse.pi-hole.net/t/option-to-block-not-forward-all-aaaa-queries/34837/22 "2020-06-24T17:07:58Z")

</div>

How much? In actual, measurable numbers like total bytes. Less than 1MB?

---

<div class="post-metadata">

### Author: ![jfb](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jfb/32/4332_2.png) [@jfb](https://discourse.pi-hole.net/u/jfb)
#### Post date: [June 24, 2020, 5:18pm UTC](https://discourse.pi-hole.net/t/option-to-block-not-forward-all-aaaa-queries/34837/23 "2020-06-24T17:18:33Z")

</div>

> [@yubiuser](#):
>
> This is the pessimistic view.

This is not a view, it's a question. This is a feature request of unknown benefit, and a question of whether the feature would actually accomplish the desired goal.

---

<div class="post-metadata">

### Author: ![yubiuser](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/yubiuser/32/12100_2.png) [@yubiuser](https://discourse.pi-hole.net/u/yubiuser)
#### Post date: [June 24, 2020, 5:25pm UTC](https://discourse.pi-hole.net/t/option-to-block-not-forward-all-aaaa-queries/34837/24 "2020-06-24T17:25:58Z")

</div>

> [@DanSchaper](#):
>
> How much? In actual, measurable numbers like total bytes. Less than 1MB?

Since 09.06.2020 I had 14606 forwarded AAAA queries. If response size is just 512 Byte it would have saved 14606x512/(1024x1024)=7,13MB.

---

<div class="post-metadata">

### Author: ![DL6ER](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dl6er/32/281_2.png) [@DL6ER](https://discourse.pi-hole.net/u/DL6ER)
#### Post date: [June 24, 2020, 5:47pm UTC](https://discourse.pi-hole.net/t/option-to-block-not-forward-all-aaaa-queries/34837/25 "2020-06-24T17:47:54Z")

</div>

When we implement this, requests will maybe arise to add this for other queries as well. For a second, I thought about adding a query-type-dependent regex extension. But this would be a lot of work and I don't see a justification for this right now.

---

<div class="post-metadata">

### Author: ![yubiuser](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/yubiuser/32/12100_2.png) [@yubiuser](https://discourse.pi-hole.net/u/yubiuser)
#### Post date: [June 24, 2020, 5:54pm UTC](https://discourse.pi-hole.net/t/option-to-block-not-forward-all-aaaa-queries/34837/26 "2020-06-24T17:54:21Z")

</div>

I was thinking more in the direction of what you did with extending the possible types of client assignments (IP, subnet, MAC, interface, vendor, **query type** ). Not sure if technically feasible at all at this place.

---

<div class="post-metadata">

### Author: ![DL6ER](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dl6er/32/281_2.png) [@DL6ER](https://discourse.pi-hole.net/u/DL6ER)
#### Post date: [June 24, 2020, 5:56pm UTC](https://discourse.pi-hole.net/t/option-to-block-not-forward-all-aaaa-queries/34837/27 "2020-06-24T17:56:46Z")

</div>

> [@yubiuser](#):
>
> Not sure if technically feasible at all at this place.

Not at all. Clients and queries are entirely different things. The per-client filtering could not even be abstracted for this.

---

<div class="post-metadata">

### Author: ![yubiuser](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/yubiuser/32/12100_2.png) [@yubiuser](https://discourse.pi-hole.net/u/yubiuser)
#### Post date: [June 24, 2020, 5:59pm UTC](https://discourse.pi-hole.net/t/option-to-block-not-forward-all-aaaa-queries/34837/28 "2020-06-24T17:59:39Z")

</div>

Ok, thanks.

---

<div class="post-metadata">

### Author: ![yubiuser](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/yubiuser/32/12100_2.png) [@yubiuser](https://discourse.pi-hole.net/u/yubiuser)
#### Post date: [June 25, 2020, 8:01am UTC](https://discourse.pi-hole.net/t/option-to-block-not-forward-all-aaaa-queries/34837/29 "2020-06-25T08:01:58Z")

</div>

> [@yubiuser](#):
>
> Since 09.06.2020 I had 14606 forwarded AAAA queries. If response size is just 512 Byte it would have saved 14606x512/(1024x1024)=7,13MB.

Just a follow up: I had a look at the ten most forwarded domains, making up ~70% of all forwarded AAAA queries. Not as single answer with only 512 bytes, they were all 1472 or 4096 bytes. The most common query was www.google.com (6300x) with 4096 bytes.

So the network traffic is likely to be **3 - 8x** bigger than the calculation above.

---

<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: [June 25, 2020, 8:55am UTC](https://discourse.pi-hole.net/t/option-to-block-not-forward-all-aaaa-queries/34837/31 "2020-06-25T08:55:39Z")

</div>

www.google.com has a TTL of 300 seconds, so 6300 x 5 minutes = 525 hours of continuous google usage since June 9th. That is pretty impressive. Or was this over an entire year (=whole database)? Even is so, this roughly means two hours of Google a day. It is not unrealistic in itself, however, maybe still a bit extreme.

---

<div class="post-metadata">

### Author: ![yubiuser](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/yubiuser/32/12100_2.png) [@yubiuser](https://discourse.pi-hole.net/u/yubiuser)
#### Post date: [June 25, 2020, 9:01am UTC](https://discourse.pi-hole.net/t/option-to-block-not-forward-all-aaaa-queries/34837/32 "2020-06-25T09:01:35Z")

</div>

No just since June 9th. Two chromcast devices...  
Actual "usage time" was maybe 2 hours.

 ![Bildschirmfoto zu 2020-06-25 11-00-17](https://discourse.pi-hole.net/uploads/default/original/3X/7/d/7d273cbd2cf20b9a581b24805eb2c672a1c44f1f.png)

---

<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: [June 25, 2020, 9:16am UTC](https://discourse.pi-hole.net/t/option-to-block-not-forward-all-aaaa-queries/34837/33 "2020-06-25T09:16:22Z")

</div>

How does it look for the Google domain without sorting by status?

---

<div class="post-metadata">

### Author: ![yubiuser](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/yubiuser/32/12100_2.png) [@yubiuser](https://discourse.pi-hole.net/u/yubiuser)
#### Post date: [June 25, 2020, 9:19am UTC](https://discourse.pi-hole.net/t/option-to-block-not-forward-all-aaaa-queries/34837/34 "2020-06-25T09:19:35Z")

</div>

![Bildschirmfoto zu 2020-06-25 11-18-57](https://discourse.pi-hole.net/uploads/default/original/3X/2/b/2be448d7bc3001610df9bae414c22533d014e9ec.png)

---

<div class="post-metadata">

### Author: ![DL6ER](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dl6er/32/281_2.png) [@DL6ER](https://discourse.pi-hole.net/u/DL6ER)
#### Post date: [July 6, 2020, 8:34pm UTC](https://discourse.pi-hole.net/t/option-to-block-not-forward-all-aaaa-queries/34837/35 "2020-07-06T20:34:53Z")

</div>

This adds an option to limit regular expressions to specific query types:

> [@RegEx engine improvements](https://discourse.pi-hole.net/t/regex-engine-improvements/34751/31):
>
> New feature: Apply regex only to a specific query type. Example: abc;querytype=AAAA will block dig AAAA abc but not dig A abc This is still experimental. Tests would be appreciated.

You could try this with an regex + query type `AAAA`:

```auto
;querytype=AAAA

```

Note that this is still an experimental feature and may not fully work under all circumstances. However, I'm thankful for reports if something doesn't work.

---

<div class="post-metadata">

### Author: ![yubiuser](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/yubiuser/32/12100_2.png) [@yubiuser](https://discourse.pi-hole.net/u/yubiuser)
#### Post date: [July 7, 2020, 8:32am UTC](https://discourse.pi-hole.net/t/option-to-block-not-forward-all-aaaa-queries/34837/36 "2020-07-07T08:32:01Z")

</div>

Thanks for the implementation.

I'll tried with `.*;querytype=AAAA` and it started working immediately.

 ![Bildschirmfoto zu 2020-07-07 10-23-01](https://discourse.pi-hole.net/uploads/default/original/3X/8/4/847c40e5f314f3ceee7803b2dc86adf2d37f8de1.png)

I'll report back findings in a few days.

---

<div class="post-metadata">

### Author: ![yubiuser](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/yubiuser/32/12100_2.png) [@yubiuser](https://discourse.pi-hole.net/u/yubiuser)
#### Post date: [July 8, 2020, 7:32am UTC](https://discourse.pi-hole.net/t/option-to-block-not-forward-all-aaaa-queries/34837/37 "2020-07-08T07:32:01Z")

</div>

> [@jfb](#):
>
> How do you know the effect on clients of blocking their AAAA queries? Will they go into a query frenzy looking for a reply, adding more DNS traffic to the network?

> [@yubiuser](#):
>
> The optimistic view is they stop querying. It's the same as now blocking an A record for a specific. domain. Some clients will desperately try to resolve, but most don't.

Blocking all `AAAA` queries for almost 24h now (since morning 07.07.2020).

I neither observe clients going crazy nor clients stopping queries AAAA records. They are just blocked, the amount of queries didn't change.

```auto
sqlite3 /etc/pihole/pihole-FTL.db -separator "," "Select count(domain), strftime('%Y-%m-%d %H',timestamp, 'unixepoch') from queries where type=2 group by strftime('%Y-%m-%d %H',timestamp, 'unixepoch')"

```

 ![Unbenannt](https://discourse.pi-hole.net/uploads/default/original/3X/7/7/770d58deaf7795a1c7111c9e17e370e01e20b8cd.png)

---

<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: [July 8, 2020, 8:19am UTC](https://discourse.pi-hole.net/t/option-to-block-not-forward-all-aaaa-queries/34837/38 "2020-07-08T08:19:01Z")

</div>

> [@yubiuser](#):
>
> I neither observe clients going crazy nor clients stopping queries AAAA records. They are just blocked, the amount of queries didn't change.

I think this is expected. IPv6 is to be preferred on the web for good reasons so you should always check if there is a way to connect via IPv6. If the system is lacking any IPv6 connectivity but is still doing AAAA lookups, then this could be considered a bug in the corresponding application.

---

<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: [July 8, 2020, 9:38pm UTC](https://discourse.pi-hole.net/t/option-to-block-not-forward-all-aaaa-queries/34837/39 "2020-07-08T21:38:22Z")

</div>

5 posts were split to a new topic: [Bug Reporting at Google](https://discourse.pi-hole.net/t/bug-reporting-at-google/35325)

---

<div class="post-metadata">

### Author: ![PromoFaux](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/promofaux/32/1545_2.png) [@PromoFaux](https://discourse.pi-hole.net/u/PromoFaux)
#### Post date: [September 10, 2020, 10:32am UTC](https://discourse.pi-hole.net/t/option-to-block-not-forward-all-aaaa-queries/34837/40 "2020-09-10T10:32:45Z")

</div>

12 posts were split to a new topic: [How to use `AAAA_QUERY_ANALYSIS ` flag](https://discourse.pi-hole.net/t/how-to-use-aaaa-query-analysis-flag/38202)

---

<div class="post-metadata">

### Author: ![yubiuser](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/yubiuser/32/12100_2.png) [@yubiuser](https://discourse.pi-hole.net/u/yubiuser)
#### Post date: [November 28, 2020, 7:55pm UTC](https://discourse.pi-hole.net/t/option-to-block-not-forward-all-aaaa-queries/34837/41 "2020-11-28T19:55:53Z")

</div>

Implemented with the improved regex engine in [Pi-hole Core/Web v5.2 and FTL v5.3 released!](https://discourse.pi-hole.net/t/pi-hole-core-web-v5-2-and-ftl-v5-3-released/40909)

[Previous page](https://discourse.pi-hole.net/t/option-to-block-not-forward-all-aaaa-queries/34837.md?page=1)

[Next page](https://discourse.pi-hole.net/t/option-to-block-not-forward-all-aaaa-queries/34837.md?page=3)
