AdGuardHome icon indicating copy to clipboard operation
AdGuardHome copied to clipboard

Bug: DoH/DoT/DoQ/HTTPS only listen on IPv4, no IPv6 support

Open handsamework opened this issue 7 months ago • 8 comments

Prerequisites

Platform (OS and CPU architecture)

Darwin (aka macOS), AMD64 (aka x86_64)

Installation

GitHub releases or script from README

Setup

On one machine

AdGuard Home version

v0.107.73

Action

1. Test DoH via IPv6

https://[2400:3200::1]/dns-query

2. Test DoT via IPv6

tls://[2400:3200::1]

3. Test DoQ via IPv6 (using dog command)

quic://[2400:3200::1]

Expected result

All encrypted DNS services (DoH/DoT/DoQ) and the HTTPS admin panel should work normally via both IPv4 and IPv6. The server should listen on :: (all IPv6 addresses) for ports 443, 853, 853

Actual result

  1. All the above tests fail when using IPv6 address (connection timeout/refused).
  2. All tests work perfectly when using IPv4 address on the same ports.
  3. Plain DNS (UDP/TCP 53) works fine on both IPv4 and IPv6.
  4. Checking port listening with ss -tuln shows ports 443/853/853 are only bound to IPv4 (0.0.0.0), not IPv6 (::)

Additional information and/or screenshots

Environment

  • Network: Dual-stack (IPv4 + IPv6), public IPv6 is available.
  • Firewall: Ports 443, 853, 853 are allowed for both IPv4 and IPv6.
  • Certificate: Valid domain SSL certificate configured correctly.

Config snippet (config.yaml)

dns:
  bind_hosts:
    - 0.0.0.0
    - ::
    - 127.0.0.1
    - ::1
  port: 53

tls:
  enabled: true
  server_name: [2400:3200::1]
  force_https: true
  port_https: 443
  port_dns_over_tls: 853
  port_dns_over_quic: 853
  certificate_chain: "/path/to/fullchain.pem"
  private_key: "/path/to/privkey.pem"

serve_http3: true

handsamework avatar May 02 '26 12:05 handsamework

Hello there! Could you please check one more thing? In the YAML config, the IPv6 wildcard address should be quoted Image Without quotes, :: may be parsed incorrectly by YAML or by the application config parser. Also, could you please confirm whether the “Disable resolving of IPv6 addresses” option is disabled in the DNS settings? It may affect IPv6/AAAA handling, so we’d like to rule it out.

GulnazSalakhova avatar May 06 '26 06:05 GulnazSalakhova

this bug link this issue: https://github.com/AdguardTeam/AdGuardHome/issues/8293 please check the problem was same?

Extreme-Icer avatar May 12 '26 15:05 Extreme-Icer

Hello there! Could you please check one more thing? In the YAML config, the IPv6 wildcard address should be quoted 图片 Without quotes, may be parsed incorrectly by YAML or by the application config parser. Also, could you please confirm whether the “Disable resolving of IPv6 addresses” option is disabled in the DNS settings? It may affect IPv6/AAAA handling, so we’d like to rule it out.::

#8293 i dont open “disable AAAA resolving” have the same problem.

Extreme-Icer avatar May 12 '26 15:05 Extreme-Icer

I can confirm that IPv6 is no longer working with DoT at least in my setup, with similar configurations.

My IPv6 address shows that the 853 port is not open/listening using nmap.

I tried to connect to my DoT domain with my Android phone and always shows only the public IPv4 address.

JMarcosHP avatar May 19 '26 06:05 JMarcosHP

Could you please confirm if the problem persists?

GulnazSalakhova avatar Sep 09 '26 10:09 GulnazSalakhova

Yes, the problem persists

JMarcosHP avatar Sep 10 '26 19:09 JMarcosHP

This works correctly in version 0.107.79. Encrypted DNS services (DoH/DoT/DoQ) and the HTTPS admin panel now correctly listen to both IPv4 and IPv6. Please update to the latest version and repeat the test.

Recommendation: In the 'bind_hostsfield, specify only one address — either0.0.0.0** or **::`, but not both. Listing both options leads to a port conflict and an emergency shutdown of the server, since the first connection already creates a socket with two stacks covering both stacks.

GulnazSalakhova avatar Sep 11 '26 09:09 GulnazSalakhova

Recommendation: In the 'bind_hostsfield, specify only one address — either0.0.0.0** or **::`, but not both. Listing both options leads to a port conflict and an emergency shutdown of the server, since the first connection already creates a socket with two stacks covering both stacks.

@GulnazSalakhova Thank you very much, it's working now. But that exposed on all addresses, not an issue for me because I can block all unwanted ip via firewall.

But it would be a good idea for adguard to allow users to select which types of IP addresses to prioritize for listening, or to provide an option to automatically update and republish IPv6 GUAs when their prefixes change, since many ISPs offer this type of configuration. If I were to manually specify the IPv6 GUAs in the .yaml file, I would have to do so every time the prefix changes.

Image Image

JMarcosHP avatar Sep 11 '26 16:09 JMarcosHP