{"id":15148188,"url":"https://github.com/TimInTech/Pi-hole-Unbound-PiAlert-Setup","last_synced_at":"2025-08-22T14:31:24.406Z","repository":{"id":195760389,"uuid":"693602835","full_name":"gummiflip/Pi-hole-Pi.Alert-Installation-","owner":"gummiflip","description":"Pi-hole \u0026 Pi.Alert Installation on Raspberry Pi","archived":false,"fork":false,"pushed_at":"2023-09-20T15:38:03.000Z","size":7,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-20T15:17:53.948Z","etag":null,"topics":["debian","gummiflip","netzwerk","pihole","proxmox","raspberry-pi"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gummiflip.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-19T10:59:00.000Z","updated_at":"2024-10-25T09:41:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"a862513b-4c02-407a-9ece-059635fb8a95","html_url":"https://github.com/gummiflip/Pi-hole-Pi.Alert-Installation-","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"16910f421d32b38d3c6e0f4b4fb282c440112ba7"},"previous_names":["gummiflip/pi-hole-pi.alert-installation-"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gummiflip%2FPi-hole-Pi.Alert-Installation-","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gummiflip%2FPi-hole-Pi.Alert-Installation-/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gummiflip%2FPi-hole-Pi.Alert-Installation-/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gummiflip%2FPi-hole-Pi.Alert-Installation-/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gummiflip","download_url":"https://codeload.github.com/gummiflip/Pi-hole-Pi.Alert-Installation-/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230603665,"owners_count":18251977,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["debian","gummiflip","netzwerk","pihole","proxmox","raspberry-pi"],"created_at":"2024-09-26T13:01:42.661Z","updated_at":"2025-08-22T14:31:24.275Z","avatar_url":"https://github.com/gummiflip.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n\n# Pi-hole + Unbound + Pi.Alert Setup\n\n![Pi-hole + Unbound Setup](https://github.com/TimInTech/Pi-hole-Unbound-PiAlert-Setup/blob/main/eea62b352f4d0301.png)\n\nThis repository provides a detailed guide on setting up **Pi-hole with Unbound** as a local DNS resolver and **Pi.Alert** for network monitoring.\n\n**Note:** This guide consistently uses the official \"Pi.Alert\" spelling.\n\n## 📌 Comprehensive Pi-hole 6 Configuration\nIf you're looking for an **in-depth guide** with additional optimizations, check out my full **Pi-hole v6.0 - Comprehensive Guide**:\n\n➡ **[Pi-hole v6.0 - Comprehensive Guide](https://github.com/TimInTech/Pi-hole-v6.0---Comprehensive-Guide)**\n\n🔗 **Official Resources**  \n[GitHub Repository](https://github.com/pi-hole/pi-hole) | [v6 Migration Guide](https://docs.pi-hole.net/docker/upgrading/v5-v6/)  \n---\n\n**Recommended Hardware**: [Raspberry Pi 4 Kit (8GB)](https://amzn.to/4gXEciT) *(Amazon affiliate link)* with NVMe SSD via USB 3.0\n### Features included:\n- Advanced **Pi-hole configurations**\n- Optimized **DNS settings**\n- **Blocklist \u0026 whitelist** management\n- Additional **performance and privacy tweaks**\n- Integrated **Python monitoring suite** (`start_suite.py`) with REST API\n\n## Table of Contents\n- [Installation Guide](#installation-guide)\n  - [1️⃣ Installing Pi-hole](#1-installing-pi-hole)\n  - [2️⃣ Installing Pi.Alert](#2-installing-pialert)\n  - [3️⃣ Setting Up Unbound as an Upstream DNS for Pi-hole](#3-setting-up-unbound-as-an-upstream-dns-for-pi-hole)\n  - [4️⃣ Configuring Pi-hole to Use Unbound as Upstream DNS](#4-configuring-pi-hole-to-use-unbound-as-upstream-dns)\n  - [5️⃣ Testing Unbound Functionality](#5-testing-unbound-functionality)\n  - [6️⃣ Common Issues \u0026 Solutions](#6-common-issues-solutions)\n  - [7️⃣ Optimization \u0026 Advanced Settings](#7-optimization-advanced-settings)\n  - [8️⃣ Conclusion](#8-conclusion)\n- [🚀 Integrated Python Suite](#-integrated-python-suite)\n- [Troubleshooting \u0026 Common Issues](#troubleshooting-common-issues)\n\n## 🔹 Feedback \u0026 Updates\nFeel free to share your feedback and suggestions! If you find any issues or have ideas for improvements, open an **Issue** or submit a **Pull Request**.\n\n---\n\n# Installation Guide\n\n## 1️⃣ Installing Pi-hole\nPi-hole filters DNS requests to block advertisements across the network.\n\n### Installation on Ubuntu/Debian\n```bash\ncurl -sSL https://install.pi-hole.net | bash\n```\nFollow the installation prompts and note down your web interface login credentials.\n\n### Accessing the Web Interface\n- Open: `http://pi.hole/admin`\n- Or replace `pi.hole` with your Pi-hole server’s IP address.\n\n### Post-Installation Configuration\nUpdate block lists and rules:\n```bash\npihole -g\n```\nEnsure Pi-hole starts automatically at boot:\n```bash\nsudo systemctl enable pihole-FTL\nsudo systemctl restart pihole-FTL\n```\n\n---\n\n## 2️⃣ Installing Pi.Alert\nPi.Alert monitors the network and detects new devices.\n\n### Pi.Alert Installation\n```bash\nsudo apt update \u0026\u0026 sudo apt install git -y\ngit clone https://github.com/jokob-sk/NetAlertX.git /opt/netalertx\ncd /opt/netalertx\nchmod +x install/install.debian.sh\nsudo ./install/install.debian.sh\n```\nOnce installed, access the web interface at `http://\u003cIP\u003e:20211`.\n\n---\n\n## 3️⃣ Setting Up Unbound as an Upstream DNS for Pi-hole\nUnbound allows independent and secure DNS resolution without third-party services.\n\n### Installing Unbound\n```bash\nsudo apt update \u0026\u0026 sudo apt install unbound -y\n```\n\n### Configuring Unbound for Pi-hole\nCreate the configuration file:\n```bash\nsudo nano /etc/unbound/unbound.conf.d/pi-hole.conf\n```\nAdd the following content:\n```yaml\nserver:\n    verbosity: 0\n    interface: 127.0.0.1\n    port: 5335\n    do-ip4: yes\n    do-ip6: no\n    do-udp: yes\n    do-tcp: yes\n    root-hints: \"/var/lib/unbound/root.hints\"\n    harden-glue: yes\n    harden-dnssec-stripped: yes\n    use-caps-for-id: no\n    edns-buffer-size: 1232\n    prefetch: yes\n    num-threads: 1\n    so-rcvbuf: 1m\n    private-address: 192.168.0.0/16\n    private-address: 172.16.0.0/12\n    private-address: 10.0.0.0/8\n```\n\n### Downloading Root Server Hints\n```bash\nsudo wget -O /var/lib/unbound/root.hints https://www.internic.net/domain/named.cache\nsudo chown unbound:unbound /var/lib/unbound/root.hints\n```\n\n### Restart and Enable Unbound\n```bash\nsudo systemctl restart unbound\nsudo systemctl enable unbound\n```\n\n---\n\n## 4️⃣ Configuring Pi-hole to Use Unbound as Upstream DNS\n1. Open the Pi-hole Web Interface (`http://pi.hole/admin`).\n2. Navigate to **Settings → DNS**.\n3. Disable all external DNS providers (Google, Cloudflare, OpenDNS, etc.).\n4. Set `127.0.0.1#5335` as the upstream DNS.\n5. Save the changes and restart Pi-hole:\n```bash\npihole restartdns\n```\n\n---\n\n## 5️⃣ Testing Unbound Functionality\nVerify that Unbound resolves DNS queries correctly:\n```bash\ndig google.com @127.0.0.1 -p 5335\n```\nIf the response contains `status: NOERROR`, the configuration is working correctly.\n\n---\n\n## 6️⃣ Common Issues \u0026 Solutions\n\n### \"SERVFAIL\" Error in DNS Resolution\nCheck if Unbound is running:\n```bash\nsudo systemctl status unbound\n```\nTest Unbound manually:\n```bash\ndig google.com @127.0.0.1 -p 5335\n```\n\n### Slow DNS Resolution\n- Ensure **root server hints** are correctly downloaded.\n- Disable **DNSSEC in Pi-hole** (Unbound handles it already).\n\n### Issues with IPv6 DNS Resolution\nIf IPv6 is required:\n- Change `do-ip6: no` to `do-ip6: yes` in the Unbound config file.\n- Check your network's **IPv6 settings**.\n\n### \"Connection refused\" Error\nIf Unbound is not responding:\n- Ensure the firewall is not blocking port 5335:\n```bash\nsudo ufw allow 5335/tcp\nsudo ufw reload\n```\n\n---\n\n## 7️⃣ Optimization \u0026 Advanced Settings\n\n### Increase Cache Size\n```yaml\ncache-max-ttl: 86400\ncache-min-ttl: 3600\n```\n\n### Enable Error Logging\n```yaml\nlogfile: \"/var/log/unbound.log\"\n```\nCheck the log for troubleshooting:\n```bash\nsudo tail -f /var/log/unbound.log\n```\n\n### Test DNSSEC Validation\n```bash\ndig sigok.verteiltesysteme.net @127.0.0.1 -p 5335\n```\nIf the response includes `status: NOERROR`, DNSSEC is correctly configured.\n\n---\n\n## 8️⃣ Conclusion\nWith this setup, you achieve a **fast, secure, and private DNS system**:\n✔ **Ad-blocking (Pi-hole)** for a cleaner browsing experience\n✔ **Network monitoring (Pi.Alert)** for better control\n✔ **Independent DNS resolution (Unbound)** for privacy\n\n## 🚀 Integrated Python Suite\nThe repository now includes a lightweight monitoring stack written in Python.\nRun `./start_suite.py` to launch DNS logging, IP allocation helpers and the\nlocal REST API on `127.0.0.1:8090`.\n\n## 📌 Troubleshooting \u0026 Common Issues\nFor common Pi-hole v6 issues and solutions, check out the **[Troubleshooting Guide](TROUBLESHOOTING.md)**.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTimInTech%2FPi-hole-Unbound-PiAlert-Setup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTimInTech%2FPi-hole-Unbound-PiAlert-Setup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTimInTech%2FPi-hole-Unbound-PiAlert-Setup/lists"}