Is it possible to return only the ipv6 address when having both ipv4 and ipv6 addresses #3612

Closed
opened 2026-03-04 03:57:53 -05:00 by deekerman · 1 comment
Owner

Originally created by @keeker233 on GitHub (Apr 9, 2022).

Have a question or an idea? Please search it on our forum to make sure it was not yet asked. If you cannot find what you had in mind, please submit it here.

Prerequisites

Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

  • I am running the latest version
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed

Problem Description

In the campus network environment, I hope to use ipv6 and use ipv6 as much as possible, but most software and equipment are still given priority to ipv4 in use. Can I set in adguardhome to only return ipv6 addresses for dual-stack URLs which have both ipv4 address and ipv6 address, so that the device can access it as a pure ipv6 website

Proposed Solution

Add an option to adguardhome to return only ipv4 or ipv6 addresses if the url has both ipv4 and ipv6 addresses

Alternatives Considered

Additional Information

At present, I manually set the ipv6 address in dns rewrite, but I cannot easily find the parsed ipv6 address in the query record. Its response is only represented by NOERROR. Is there any convenient way to find the parsed ipv6 address? ipv6 address?

Originally created by @keeker233 on GitHub (Apr 9, 2022). Have a question or an idea? Please search it [on our forum](https://github.com/AdguardTeam/AdGuardHome/discussions) to make sure it was not yet asked. If you cannot find what you had in mind, please [submit it here](https://github.com/AdguardTeam/AdGuardHome/discussions/new). ### Prerequisites Please answer the following questions for yourself before submitting an issue. **YOU MAY DELETE THE PREREQUISITES SECTION.** - [x] I am running the latest version - [x] I checked the documentation and found no answer - [ ] I checked to make sure that this issue has not already been filed ### Problem Description <!-- Is your feature request related to a problem? Please add a clear and concise description of what the problem is. --> In the campus network environment, I hope to use ipv6 and use ipv6 as much as possible, but most software and equipment are still given priority to ipv4 in use. Can I set in adguardhome to only return ipv6 addresses for dual-stack URLs which have both ipv4 address and ipv6 address, so that the device can access it as a pure ipv6 website ### Proposed Solution <!-- Describe the solution you'd like in a clear and concise manner --> Add an option to adguardhome to return only ipv4 or ipv6 addresses if the url has both ipv4 and ipv6 addresses ### Alternatives Considered <!-- A clear and concise description of any alternative solutions or features you've considered. --> ### Additional Information <!-- Add any other context about the problem here. --> At present, I manually set the ipv6 address in dns rewrite, but I cannot easily find the parsed ipv6 address in the query record. Its response is only represented by NOERROR. Is there any convenient way to find the parsed ipv6 address? ipv6 address?
Author
Owner

@fernvenue commented on GitHub (Apr 9, 2022):

AdGuardHome can't and shouldn't do that.

As we know, DNS Server's response is based on the client's request type:

  • Send a request for type A, AdGuardHome will and should response with IPv4 address.
  • Send a request for type AAAA, AdGuardHome will and should response with IPv6 address.

So this is clearly a client behavior, you should set Prefer IPv6 on your device or application. And what AdGuardHome can do is drop all request for a specific type, just like aaaa_disabled in AdGuardHome.yaml now:

aaaa_disabled — Respond with an empty answer to all AAAA requests. --AdGuardHome Wiki

By the way, it might make sense to change this feature to a specific type that can be set.

@fernvenue commented on GitHub (Apr 9, 2022): **AdGuardHome can't and shouldn't do that.** As we know, DNS Server's response is based on the client's request type: - Send a request for type `A`, AdGuardHome will and should response with IPv4 address. - Send a request for type `AAAA`, AdGuardHome will and should response with IPv6 address. So this is clearly a client behavior, you should set Prefer IPv6 on your device or application. And what AdGuardHome can do is drop all request for a specific type, just like `aaaa_disabled` in `AdGuardHome.yaml` now: > `aaaa_disabled` — Respond with an empty answer to all AAAA requests. --[AdGuardHome Wiki](https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#configuration-file) By the way, it might make sense to change this feature to a specific type that can be set.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/AdGuardHome#3612
No description provided.