Skip to content

Bug: DNS over TLS Errors Cannot Resolve Hostname, Must use DoHΒ #3121

@emogu2

Description

@emogu2

Is this urgent?

No

Host OS

MacOS 26.2

CPU arch

armv7l

VPN service provider

ProtonVPN

What are you using to run the container

docker-compose

What is the version of Gluetun

Running version latest built on 2026-01-27T09:16:51.996Z (commit facc6df)

What's the problem πŸ€”

I've found a satisfactory way around this issue using DoH, hence it not being urgent, but I'm still very curious about what is failing between DoT and Cloudflare. This started abruptly and I first noticed it 4 days ago. The containers using network_mode: "container:gluetun" (including nzbget and prowlarr) were presenting errors such as:

Could not resolve hostname usenet.host1.com Error -3 - Try again
Could not resolve hostname usenet.host2.com: Error -3 - Try again
Blocking Usenet (usenet.host1.com) for 10 sec

Unable to connect to indexer. This is typically caused by DNS/SSL issues. Check DNS settings, ensure IPv6 is working or disabled, consider using different DNS servers, or try a VPN/proxy if needed. See: 'https://wiki.servarr.com/prowlarr/troubleshooting#dns-ssl-connection-issues' Resource temporarily unavailable (usenetindexer.com:443)

I tried generating a new Proton privatekey and pulling down the stack and restarting it with fresh pulls. Each time it would appear to work ok but after 20-30 minutes it would stop being able to resolve hostnames again.

So I started tweaking environment variables. Setting dot=off worked, so I determined the issue had something to do with DNS, TLS, or Cloudflare. I googled around for a couple days and tried alternatives such as setting DNS upstream resolvers to ones other than CF, setting DNS keep nameserver off, and block malicious to off, and several combinations thereof. I also tried shutting off my Pihole and other containers establishing network interfaces. Finally setting upstream resolver type to DoH seemed to be the most stable encrypted DNS option that worked. I'm ok leaving it like that, but if there's something I've done incorrectly that results in DoT being unable to resolve hostnames I'd like to correct it in the meantime.

Share your logs (at least 10 lines)

2026-02-04T09:53:22-05:00 WARN HEALTH_VPN_DURATION_INITIAL is obsolete
2026-02-04T09:53:22-05:00 INFO [routing] default route found: interface eth0, gateway redacted, assigned IP redacted and family v4
2026-02-04T09:53:22-05:00 INFO [routing] local ethernet link found: gretap0
2026-02-04T09:53:22-05:00 INFO [routing] local ethernet link found: erspan0
2026-02-04T09:53:22-05:00 INFO [routing] local ethernet link found: eth0
2026-02-04T09:53:22-05:00 INFO [routing] local ipnet found: redacted/16
2026-02-04T09:53:22-05:00 INFO [firewall] enabling...
2026-02-04T09:53:22-05:00 INFO [firewall] enabled successfully
2026-02-04T09:53:23-05:00 INFO [storage] merging by most recent 20717 hardcoded servers and 20717 servers read from /gluetun/servers.json
2026-02-04T09:53:23-05:00 INFO Alpine version: 3.22.2
2026-02-04T09:53:23-05:00 INFO OpenVPN 2.5 version: 2.5.10
2026-02-04T09:53:23-05:00 INFO OpenVPN 2.6 version: 2.6.16
2026-02-04T09:53:23-05:00 INFO IPtables version: v1.8.11
2026-02-04T09:53:23-05:00 INFO Settings summary:

β”œβ”€β”€ VPN settings:
|   β”œβ”€β”€ VPN provider settings:
|   |   β”œβ”€β”€ Name: protonvpn
|   |   β”œβ”€β”€ Server selection settings:
|   |   |   β”œβ”€β”€ VPN type: wireguard
|   |   |   β”œβ”€β”€ Hostnames: redacted
|   |   |   β”œβ”€β”€ Port forwarding only servers: yes
|   |   |   └── Wireguard selection settings:
|   |   └── Automatic port forwarding settings:
|   |       β”œβ”€β”€ Redirection listening port: disabled
|   |       β”œβ”€β”€ Use port forwarding code for current provider
|   |       β”œβ”€β”€ Forwarded port file path: /tmp/gluetun/forwarded_port
|   |       β”œβ”€β”€ Forwarded port up command: /bin/sh -c 'wget -O- --retry-connrefused --post-data "json={\"listen_port\":$(echo {{PORTS}} | cut -d, -f1),\"random_port\":false,\"upnp\":false}" http://127.0.0.1:8480/api/v2/app/setPreferences 2>&1'
|   |       └── Forwarded port down command: /bin/sh -c 'wget -O- --retry-connrefused --post-data "json={\"listen_port\":123}" http://127.0.0.1:8480/api/v2/app/setPreferences 2>&1'
|   └── Wireguard settings:
|       β”œβ”€β”€ Private key: redacted
|       β”œβ”€β”€ Interface addresses:
|       |   └── 10.2.0.2/32
|       β”œβ”€β”€ Allowed IPs:
|       |   β”œβ”€β”€ 0.0.0.0/0
|       |   └── ::/0
|       └── Network interface: tun0
|           └── MTU: 1320
β”œβ”€β”€ DNS settings:
|   β”œβ”€β”€ Keep existing nameserver(s): no
|   β”œβ”€β”€ DNS server address to use: 127.0.0.1
|   β”œβ”€β”€ DNS forwarder server enabled: yes
|   β”œβ”€β”€ Upstream resolver type: dot
|   β”œβ”€β”€ Upstream resolvers:
|   |   └── cloudflare
|   β”œβ”€β”€ Caching: yes
|   β”œβ”€β”€ IPv6: no
|   β”œβ”€β”€ Update period: every 24h0m0s
|   └── DNS filtering settings:
|       β”œβ”€β”€ Block malicious: yes
|       β”œβ”€β”€ Block ads: no
|       └── Block surveillance: no
β”œβ”€β”€ Firewall settings:
|   β”œβ”€β”€ Enabled: yes
|   └── Outbound subnets:
|       └── redacted
β”œβ”€β”€ Log settings:
|   └── Log level: info
β”œβ”€β”€ Health settings:
|   β”œβ”€β”€ Server listening address: 127.0.0.1:9999
|   β”œβ”€β”€ Target addresses:
|   |   β”œβ”€β”€ cloudflare.com:443
|   |   └── github.com:443
|   β”œβ”€β”€ Small health check type: ICMP echo request
|   |   └── ICMP target IPs:
|   |       β”œβ”€β”€ 1.1.1.1
|   |       └── 8.8.8.8
|   └── Restart VPN on healthcheck failure: yes
β”œβ”€β”€ Shadowsocks server settings:
|   └── Enabled: no
β”œβ”€β”€ HTTP proxy settings:
|   └── Enabled: no
β”œβ”€β”€ Control server settings:
|   β”œβ”€β”€ Listening address: :8000
|   β”œβ”€β”€ Logging: yes
|   └── Authentication file path: /gluetun/auth/config.toml
β”œβ”€β”€ Storage settings:
|   └── Filepath: /gluetun/servers.json
β”œβ”€β”€ OS Alpine settings:
|   β”œβ”€β”€ Process UID: 501
|   β”œβ”€β”€ Process GID: 20
|   └── Timezone: america/new_york
β”œβ”€β”€ Public IP settings:
|   β”œβ”€β”€ IP file path: /tmp/gluetun/ip
|   β”œβ”€β”€ Public IP data base API: ipinfo
|   └── Public IP data backup APIs:
|       β”œβ”€β”€ ifconfigco
|       β”œβ”€β”€ ip2location
|       └── cloudflare
β”œβ”€β”€ Server data updater settings:
|   β”œβ”€β”€ Update period: 24h0m0s
|   β”œβ”€β”€ DNS address: 1.1.1.1:53
|   β”œβ”€β”€ Minimum ratio: 0.8
|   β”œβ”€β”€ Providers to update: protonvpn
|   β”œβ”€β”€ Proton API email: 
|   └── Proton API password: [not set]
└── Version settings:
    └── Enabled: yes

2026-02-04T09:53:23-05:00 INFO [firewall] setting allowed subnets...
2026-02-04T09:53:23-05:00 INFO [routing] default route found: interface eth0, gateway redacted, assigned IP redacted and family v4
2026-02-04T09:53:23-05:00 INFO [routing] adding route for redacted
2026-02-04T09:53:23-05:00 INFO [dns] using plaintext DNS at address 1.1.1.1
2026-02-04T09:53:23-05:00 INFO [healthcheck] listening on 127.0.0.1:9999
2026-02-04T09:53:23-05:00 INFO [http server] http server listening on [::]:8000
2026-02-04T09:53:23-05:00 INFO [firewall] allowing VPN connection...
2026-02-04T09:53:23-05:00 INFO [wireguard] Using available kernelspace implementation
2026-02-04T09:53:23-05:00 INFO [wireguard] Connecting to redacted
2026-02-04T09:53:23-05:00 INFO [wireguard] Wireguard setup is complete. Note Wireguard is a silent protocol and it may or may not work, without giving any error message. Typically i/o timeout errors indicate the Wireguard connection is not working.
2026-02-04T09:53:23-05:00 INFO [MTU discovery] finding maximum MTU, this can take up to 4 seconds
2026-02-04T09:53:23-05:00 INFO [MTU discovery] setting VPN interface tun0 MTU to maximum valid MTU 1440
2026-02-04T09:53:24-05:00 INFO [dns] downloading hostnames and IP block lists
2026-02-04T09:53:26-05:00 INFO [dns] DNS server listening on [::]:53
2026-02-04T09:53:27-05:00 INFO [dns] ready
2026-02-04T09:53:28-05:00 INFO [ip getter] Public IP address is redacted
2026-02-04T09:53:29-05:00 INFO [vpn] You are running on the bleeding edge of latest!
2026-02-04T09:53:29-05:00 INFO [port forwarding] starting

Share your configuration

---
services:
  gluetun:
    image: qmcgaw/gluetun:latest
    container_name: gluetun
    cap_add:
      - NET_ADMIN
    devices:
      - /dev/net/tun:/dev/net/tun
    ports:
      - 9696:9696
      - 6789:6789
      - 8480:8480
      - 8686:8686
      - 8084:8084
      - 5078:5078
      - 1080:3000
    volumes:
      - /Volumes/Plex/gluetun:/gluetun
    environment:
      - VPN_SERVICE_PROVIDER=protonvpn
      - VPN_TYPE=wireguard
      - FIREWALL_OUTBOUND_SUBNETS=redacted
      - HEALTH_VPN_DURATION_INITIAL=120s
      # Wireguard:
      - WIREGUARD_PRIVATE_KEY=redacted
      - VPN_PORT_FORWARDING=on
      # Automatically update qbittorrent with forwarded port:
      - VPN_PORT_FORWARDING_UP_COMMAND=snipped for length
      - VPN_PORT_FORWARDING_DOWN_COMMAND=snipped for length
      - TZ=America/New_York
      - PUID=501
      - PGID=20
      - SERVER_HOSTNAMES=snipped for length
      # Server list updater
      - UPDATER_PERIOD=24h
    restart: unless-stopped


Here's a compose for a separate container using Gluetun:
---
services:
  nzbget:
    image: nzbgetcom/nzbget:latest
    container_name: nzbget
    network_mode: container:gluetun
    environment:
      - PUID=1000
      - PGID=100
      - TZ=America/New_York
    volumes:
      - /Volumes/Plex/NZBGet/config:/config
      - /Volumes/Plex/NZBGet/data:/data
      - /Volumes/Plex/NZBGet:/temp
      - /Volumes/Media/Downloads:/downloads
    restart: unless-stopped

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions