https://github.com/tsaouste/pihole-vpn-setup
This project installs and configures Pi-hole and PiVPN (WireGuard/OpenVPN) on a Raspberry Pi, with UFW firewall, security hardening, and optional automation features.
https://github.com/tsaouste/pihole-vpn-setup
ad-block ad-blocker ad-blocking ad-free openvpn openvpn-server pihole pivpn raspberry raspberry-pi raspberry-pi-zero-w raspberrypi raspbian ufw ufw-firewall vpn vpn-server wireguard wireguard-vpn
Last synced: about 1 month ago
JSON representation
This project installs and configures Pi-hole and PiVPN (WireGuard/OpenVPN) on a Raspberry Pi, with UFW firewall, security hardening, and optional automation features.
- Host: GitHub
- URL: https://github.com/tsaouste/pihole-vpn-setup
- Owner: tsaouste
- License: mit
- Created: 2025-08-26T17:21:06.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2025-08-26T20:12:25.000Z (about 1 month ago)
- Last Synced: 2025-08-27T00:15:06.226Z (about 1 month ago)
- Topics: ad-block, ad-blocker, ad-blocking, ad-free, openvpn, openvpn-server, pihole, pivpn, raspberry, raspberry-pi, raspberry-pi-zero-w, raspberrypi, raspbian, ufw, ufw-firewall, vpn, vpn-server, wireguard, wireguard-vpn
- Language: Shell
- Homepage:
- Size: 35.2 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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:```bash
wget https://raw.githubusercontent.com/tsaouste/pihole-vpn-setup/refs/heads/main/pihole-vpn-setup.sh
```
```bash
chmod +x pihole-vpn-setup.sh
```
---## βΆοΈ Usage
After installation, simply run:```bash
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.