Image: reddit.com · Route any Docker container through AdGuard VPN, with a kill switch (no gluetun support, so I built a small gateway)
A Docker gateway routing containers through AdGuard VPN with a kill switch
Claude Code built a small gateway container because gluetun-style images lacked AdGuard VPN support.
Credits
- Reddit poster telsaton Source ↗
- Repository account Githubtezla Source ↗
Earliest dated source:
The full story
The poster has an AdGuard VPN subscription and wanted some containers to use it, but gluetun and similar images did not support it. With Claude Code they built a small Debian gateway container with the official CLI in TUN mode; other containers join it via network_mode and can only reach the internet through the tunnel.
An iptables kill switch blocks traffic if the VPN drops. The poster fixed problems such as the login being bound to the machine ID or MAC, and has run it on their NAS since early October 2026, rechecking the kill switch in a throwaway container.
How it was done
Tools
Themes
Loading themes…
Sources
From a short post by the maker, so the details are as they tell them.
- Reddit: Route any Docker container through AdGuard VPN, with a kill switch (no gluetun support, so I built aReddit poster: telsatonPosted
The maker's post on r/ClaudeCode.
If it disappears: archived copy of Reddit: Route any Docker container through AdGuard VPN, with a kill switch (no gluetun support, so I built a (opens in a new tab)
- The code: github.comRepository account: Githubtezla
Linked in the post.