Introduction

AutoGuard VPN

AutoGuard VPN is a fully self-hosted, containerized VPN stack. It provides automated peer registration via a secure API, network-wide ad blocking through Pi-hole, and private recursive DNS resolution via Unbound — all running on a single Docker host.

Features

  • Zero-touch client onboarding — run one script on Linux or Windows to connect
  • Ad-blocking DNS — Pi-hole intercepts all VPN client DNS queries
  • Recursive DNSSEC DNS — Unbound resolves from root servers with no third-party DNS in the chain
  • Hot peer reloadinotifywait loads new peers into WireGuard without restarting any container
  • Timing-safe token authsecrets.compare_digest prevents timing attacks on peer registration

Network Topology

Quick Start

git clone https://github.com/ElvinSuleymanov/AutoGuard-VPN.git
cd AutoGuard-VPN
chmod +x setup.sh
./setup.sh

After setup.sh completes, copy ./scripts/setupclient.sh (Linux) or ./scripts/setupclient.ps1 (Windows) to each client and run it as root/Administrator.

Service Summary

ServiceImageIPExposed PortRole
wireguardcustom172.29.144.1051820/udpWireGuard VPN server
unboundmvance/unbound172.29.144.20noneRecursive DNS
piholepihole/pihole172.29.144.3065231/tcpAd-blocking DNS
nginx-proxynginx:alpine172.29.144.40443/tcpTLS reverse proxy
auth-servicecustom FastAPI172.29.144.50nonePeer registration API

WireGuard clients receive IPs in 10.13.26.0/24 starting at 10.13.26.2, supporting up to 253 peers.