π Ad-free browsing, everywhere you go
This project installs and configures Pi-hole and PiVPN (WireGuard/OpenVPN) on a Raspberry Pi, with UFW firewall, security hardening, and optional automation features.
The script is fully interactive β guiding you step by step while letting you customize the configuration.
- β Pi-hole installation & management
- β PiVPN setup (WireGuard or OpenVPN)
- β UFW firewall rules with interactive prompts
- β
Security hardening (ICMP, IPv6,
/tmp,/dev/shm) - β Automatic updates & scheduled reboots
- β Friendly interactive prompts for every choice
- β Can be safely re-run anytime to adjust settings
Download and install the latest release with just two commands:
wget https://raw.githubusercontent.com/tsaouste/pihole-vpn-setup/refs/heads/main/pihole-vpn-setup.shchmod +x pihole-vpn-setup.shAfter installation, simply run:
sudo ./pihole-vpn-setup.shThe script will check whatβs already installed and skip unnecessary steps. You can re-run it anytime to adjust firewall rules, or reconfigure services.
- Raspberry Pi (Zero 2 W or newer recommended)
- Raspberry Pi OS Lite (64-bit)
- Ethernet connection (preferred for stability)
- Sudo privileges
- π Security-first: designed to expose only VPN ports. Pi-hole services are available only via VPN or LAN.
- β‘ Lightweight: unnecessary services (Bluetooth, Avahi, WPA, etc.) can be disabled interactively.
- π Mobile friendly: connect your phone via VPN β enjoy ad-free internet anywhere.
This entire project was written with the help of ChatGPT (OpenAI), fine-tuned through many iterations of testing and customization.
MIT License β feel free to use, share, and modify with attribution.