Is this urgent?
No
Host OS
No response
CPU arch
None
VPN service provider
Custom
What are you using to run the container
docker-compose
What is the version of Gluetun
3.41.2 and 3.41.3
What's the problem 🤔
When upgrading from gluetun v3.41.1 to v3.41.2+ (tested v3.41.2 and v3.41.3), the DNS configuration variable DNS_UPSTREAM_PLAIN_ADDRESSES is ignored. gluetun's internal DNS forwarder always uses Cloudflare (1.1.1.1) as the upstream resolver regardless of configuration.
This is a regression from v3.41.1 where DNS_KEEP_NAMESERVER=on preserved the host's DNS chain. With DNS_KEEP_NAMESERVER removed in v3.41.2+, containers behind the VPN can no longer resolve internal hostnames.
Reproduction
- Create a gluetun container with custom WireGuard config
- Set
DNS_UPSTREAM_PLAIN_ADDRESSES= to any custom IP
- Set
DNS_UPSTREAM_RESOLVER_TYPE=plain
- Start the container
- Observe gluetun logs:
[dns] using plaintext DNS at address 1.1.1.1
- From gluetun container,
cat /etc/resolv.conf shows nameserver 1.1.1.1 at the top.
Expected behavior
gluetun should use the address(es) specified in DNS_UPSTREAM_PLAIN_ADDRESSES as the upstream DNS resolvers for its internal DNS forwarder.
Actual behavior
gluetun ignores DNS_UPSTREAM_PLAIN_ADDRESSES and always falls back to 1.1.1.1 (Cloudflare).
Workarounds attempted (all failed)
- Setting
dns: 127.0.0.1 in Docker compose - does not fix the issue
- Setting
DNS_UPSTREAM_RESOLVER_TYPE=plain - no effect
- Setting
DNS_UPSTREAM_PLAIN_ADDRESSES=IP - gluetun still uses 1.1.1.1
- Setting
DNS_UPSTREAM_PLAIN_ADDRESSES=IP:53 - same result
Share your logs (at least 10 lines)
2026-08-01T14:13:02-07:00 INFO [dns] using plaintext DNS at address 1.1.1.1
After setting `DNS_UPSTREAM_PLAIN_ADDRESSES=$IP` and `DNS_UPSTREAM_RESOLVER_TYPE=plain`:
[dns] using plaintext DNS at address 1.1.1.1
gluetun startup log showing DNS configuration:
├── DNS settings:
| ├── Upstream resolver type: plain
| ├── Upstream resolvers:
| | └── $IP
| ├── Caching: on
| ├── IPv6: off
| └── ...
Note: The startup log correctly shows the configured upstream resolver ($IP), but the actual DNS queries from containers use 1.1.1.1 instead.
Share your configuration
VPN_SERVICE_PROVIDER=custom
VPN_TYPE=wireguard
VPN_INTERFACE=wg0
DOT=off
FIREWALL=on
FIREWALL_VPN_INPUT_PORTS=removed
FIREWALL_OUTBOUND_SUBNETS=$IP/24
HEALTH_VPN_DURATION_INITIAL=120s
HEALTH_VPN_DURATION_ADDITION=5s
BLOCK_MALICIOUS=off
DNS_UPSTREAM_PLAIN_ADDRESSES=$IP
DNS_UPSTREAM_RESOLVER_TYPE=plain
DNS_CACHING=on
DNS_UPSTREAM_IPV6=off
UPDATER_PERIOD=0
VERSION_INFORMATION=on
HTTP_CONTROL_SERVER_AUTH_CONFIG_FILEPATH=/gluetun/config.toml
WIREGUARD_MTU=1280
### Docker compose (relevant section)
vpn-client:
image: qmcgaw/gluetun:v3.41.3
container_name: vpn-client
cap_add:
- NET_ADMIN
restart: always
environment:
- TZ=${TZ}
- PUID=${PUID}
- PGID=${PGID}
env_file:
- .gluetun.env
volumes:
- gluetun_vol:/gluetun
devices:
- /dev/net/tun:/dev/net/tun
Is this urgent?
No
Host OS
No response
CPU arch
None
VPN service provider
Custom
What are you using to run the container
docker-compose
What is the version of Gluetun
3.41.2 and 3.41.3
What's the problem 🤔
When upgrading from gluetun v3.41.1 to v3.41.2+ (tested v3.41.2 and v3.41.3), the DNS configuration variable
DNS_UPSTREAM_PLAIN_ADDRESSESis ignored. gluetun's internal DNS forwarder always uses Cloudflare (1.1.1.1) as the upstream resolver regardless of configuration.This is a regression from v3.41.1 where
DNS_KEEP_NAMESERVER=onpreserved the host's DNS chain. WithDNS_KEEP_NAMESERVERremoved in v3.41.2+, containers behind the VPN can no longer resolve internal hostnames.Reproduction
DNS_UPSTREAM_PLAIN_ADDRESSES=to any custom IPDNS_UPSTREAM_RESOLVER_TYPE=plain[dns] using plaintext DNS at address 1.1.1.1cat /etc/resolv.confshowsnameserver 1.1.1.1at the top.Expected behavior
gluetun should use the address(es) specified in
DNS_UPSTREAM_PLAIN_ADDRESSESas the upstream DNS resolvers for its internal DNS forwarder.Actual behavior
gluetun ignores
DNS_UPSTREAM_PLAIN_ADDRESSESand always falls back to 1.1.1.1 (Cloudflare).Workarounds attempted (all failed)
dns: 127.0.0.1in Docker compose - does not fix the issueDNS_UPSTREAM_RESOLVER_TYPE=plain- no effectDNS_UPSTREAM_PLAIN_ADDRESSES=IP- gluetun still uses 1.1.1.1DNS_UPSTREAM_PLAIN_ADDRESSES=IP:53- same resultShare your logs (at least 10 lines)
Share your configuration