A complete Docker-based setup combining Wireguard VPN, Pihole ad-blocking, Unbound recursive DNS, and optional Tor routing for maximum privacy and security.
- Wireguard VPN Server - Secure VPN tunnel
- Pihole - Network-wide ad blocking and DNS sinkhole
- Unbound - Recursive DNS resolver (no third-party logging)
- Tor Proxy - Optional rotating SOCKS5 proxy for anonymity
- Docker and Docker Compose installed
- Port 51820/UDP open on your firewall
- Static IP or dynamic DNS for external access
-
Clone and configure:
git clone <your-repo> cd wirehole cp .env.example .env # Edit .env with your settings
-
Start services:
# Start without Tor proxy docker-compose up -d wireguard pihole unbound # Or start everything including Tor docker-compose up -d
-
Get client configurations:
docker logs wireguard # QR codes and config files in ./wireguard/peer*/
- Mobile: Scan QR code from logs
- Desktop: Import
.conffile from./wireguard/peer*/
DNS is automatically set to your Pihole (10.72.1.2) via Wireguard.
Once connected to Wireguard VPN:
- Pihole Admin: http://10.72.1.2/admin
- Tor SOCKS5 Proxy: 10.72.1.4:9050 (if enabled)
- All services bound to Wireguard network only
- No external access except SSH and Wireguard ports
- Pihole web interface only accessible via VPN
- Unbound: Full recursive DNS (no third-party logging)
- Pihole: Query logging disabled by default
- Tor: Multiple rotating circuits for anonymity
10.72.1.1 - Wireguard Server
10.72.1.2 - Pihole DNS
10.72.1.3 - Unbound Recursive DNS
10.72.1.4 - Tor Proxy (optional)
10.72.1.5+ - Wireguard Clients
When connected to Wireguard, configure applications to use:
- SOCKS5 Proxy: 10.72.1.4:9050
- Protocol: SOCKS5 (no authentication)
- Install FoxyProxy extension
- Add new proxy:
- Type: SOCKS5
- IP: 10.72.1.4
- Port: 9050
TZ=America/Chicago
PIHOLE_PASSWORD=your_secure_password
SERVERURL=your.domain.com
PEERS=5Modern Pihole versions use pihole.toml instead of lighttpd:
[webserver]
port = "10.72.1.2:80" # VPN-only accessFull recursive DNS with privacy focus:
- Only listens on Wireguard network
- DNSSEC validation enabled
- Query minimization for privacy
docker logs pihole
docker logs unbound
docker logs wireguard
docker logs tor-proxydocker-compose restart pihole
docker-compose restart wireguard# Edit PEERS in .env file, then:
docker-compose down wireguard
docker-compose up -d wireguarddocker exec pihole pihole -g- Change default Pihole password in
.env - Use strong passwords for all services
- Keep Docker images updated regularly
- Monitor logs for suspicious activity
- Tor traffic may be blocked by some services
- Use responsibly and legally
- Consider detection by security tools
- Rotating IP addresses may trigger rate limits
# Backup Wireguard configs
tar -czf wireguard-backup.tar.gz ./wireguard/
# Backup Pihole settings
tar -czf pihole-backup.tar.gz ./pihole/# Check if UDP port is open
nc -u your-server-ip 51820
# Verify container networking
docker exec wireguard wg show# Test Unbound
dig @10.72.1.3 -p 5335 google.com
# Test Pihole
dig @10.72.1.2 google.com# Check Tor instances
docker exec tor-proxy ps aux | grep tor
# Test SOCKS connection
curl --socks5 10.72.1.4:9050 https://check.torproject.org/- RAM Usage: ~512MB total for all services
- CPU: Minimal load on modern hardware
- Storage: ~100MB for Docker images + configs
- Bandwidth: Depends on usage and Tor routing
# Update all images
docker-compose pull
docker-compose up -d
# Check for new versions
docker images | grep -E 'pihole|wireguard|unbound'