Local Docker, Tailscale, VPN DNS routing using dnsmasq & profiles.
*.internaldomain- IPv4 + IPv6 support
- Multiple Docker networks
- Collision-safe hostnames
- systemd-resolved split DNS (Linux)
- macOS resolver support
- Safe with Tailscale and NordVPN
- Automatic refresh every 10 minutes
- Manual refresh supported
- Self-documenting TXT record:
help.internalpoints to README - Supports Quad9 DNS over TLS and fallback DNS providers (Cloudflare Families)
sudo su
python3 install.pydocker-dns-updater.pydocker run -d --name web nginx
ping web.internaldig txt help.internalReturns:
" https://github.com/adamamyl/docker-dns-reso/blob/main/README.md "
--debugEnable bash tracing for troubleshooting--quietSuppress normal output--dry-runShow the DNS configuration that would be applied, without writing--forceForce update even if config hasn't changed--update-profileRe-download and apply latest Quad9 mobileconfig profile (macOS only)--use-system-dnsInclude system/DHCP-assigned DNS servers as fallback
- On macOS/Linux, can optionally include DHCP-assigned DNS servers as fallback
- Use flag:
--use-system-dnswhen runningdocker-dns-updater.sh - Injects servers directly into dnsmasq configuration to avoid external blocking
- Uses
/etc/resolver/*.internalto point*.internalto local dnsmasq - Dynamic entries handled by
docker-dns-updater.py(and system timer)
# Install everything
python3 /install.py
# Add a new container
docker run -d --name api nginx
# Refresh DNS for new container
python3 docker-dns-updater.py --force
# Test DNS resolution
ping api.internal
dig txt help.internal--config=<docker|quad9|plain|all> # What to install (default=all)
--update-profile # Re-download Quad9 profile (macOS only)
- Tailscale: dynamic internal resolution always first
- Quad9 DNS over TLS: preferred fallback, supports IPv4/IPv6/HTTPS/TLS
- Cloudflare Families: secondary fallback (1.1.1.2, 1.0.0.2, etc.) if Quad9 is blocked
- DHCP/system-assigned DNS servers can be optionally included as fallback
- Config is idempotent: running multiple times won't duplicate entries
- Config changes automatically reload
dnsmasq