GhostShield is a lightweight, custom-built DNS Sinkhole and Network Traffic Monitor designed specifically for the Raspberry Pi Zero.
Unlike other solutions, GhostShield is built entirely in Python and utilizes an in-memory database to minimize SD card wear while providing a futuristic, cyberpunk-styled live dashboard.
- 🚀 High Performance: DNS resolution and blocking occur in RAM for maximum speed.
- 👁️ "The Eye" Dashboard: A real-time web interface that visualizes network traffic and blocked threats.
- 🛑 Gravity Well: Automatically loads over 150,000 known ad and tracking domains (via StevenBlack list).
- 🐍 Pure Python: Built with
dnslibandFlask. Modern, hackable, and lightweight. - 📱 Responsive: The interface looks great on desktop, mobile, and tablets.
Follow these steps to get GhostShield running on your Raspberry Pi.
Open your terminal on the Raspberry Pi and clone the project:
git clone https://github.com/YOUR-USERNAME/GhostShield.git
cd GhostShield
chmod +x install.sh
./install.shsudo python3 src/main.py🖥️ Accessing the Dashboard Once the script is running, you can access the interface to see live statistics.
- Find your Pi's IP address (type hostname -I in the terminal).
- Open a browser on any device in your network.
- Navigate to: http:// (e.g., http://192.168.1.50)
📡 Final Step: Router Configuration For GhostShield to block ads on your phone, TV, and computer, you must configure your router to use the Raspberry Pi as its DNS server.
Log in to your router's admin panel (e.g., 192.168.0.1 or fritz.box). Look for DNS Server settings (usually under Network or Internet > Account Information). Set the Local / Primary DNS Server to the IP address of your Raspberry Pi. Save settings and reconnect your devices to the WiFi. Now, all traffic in your home flows through GhostShield! 🛡️
⚙️ Tech Stack Language: Python 3 Web Framework: Flask DNS Handling: dnslib Frontend: HTML5, TailwindCSS, Chart.js