Skip to content

This project installs and configures Pi-hole and PiVPN (WireGuard/OpenVPN) on a Raspberry Pi, with UFW firewall, security hardening, and optional automation features.

License

Notifications You must be signed in to change notification settings

tsaouste/pihole-vpn-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Pi-hole VPN Setup (pihole-vpn-setup)

πŸš€ 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.


✨ Features

  • βœ… 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

πŸ“¦ Installation

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.sh
chmod +x pihole-vpn-setup.sh

▢️ Usage

After installation, simply run:

sudo ./pihole-vpn-setup.sh

The script will check what’s already installed and skip unnecessary steps. You can re-run it anytime to adjust firewall rules, or reconfigure services.


πŸ›  Requirements

  • Raspberry Pi (Zero 2 W or newer recommended)
  • Raspberry Pi OS Lite (64-bit)
  • Ethernet connection (preferred for stability)
  • Sudo privileges

πŸ“š Project Details

  • πŸ”’ 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.

πŸ‘¨β€πŸ’» Credits

This entire project was written with the help of ChatGPT (OpenAI), fine-tuned through many iterations of testing and customization.


πŸ“ License

MIT License – feel free to use, share, and modify with attribution.

About

This project installs and configures Pi-hole and PiVPN (WireGuard/OpenVPN) on a Raspberry Pi, with UFW firewall, security hardening, and optional automation features.

Topics

Resources

License

Stars

Watchers

Forks

Languages