homelab-pihole-dns
Fungsinya
Pi-hole adalah pemblokir iklan dan pelacak untuk seluruh jaringan rumah Anda. Pi-hole mencegah situs web dan aplikasi menampilkan iklan serta melacak aktivitas Anda, dengan cara bertindak sebagai filter untuk semua permintaan internet dari rumah Anda.
Kapan dipakai
- βSaat memasang pemblokir iklan untuk seluruh jaringan.
- βSaat menyiapkan Pi-hole sebagai server DNS rumah.
- βSaat mengelola daftar situs web yang akan diblokir.
Link skill
https://github.com/affaan-m/ECC/blob/main/skills/homelab-pihole-dns/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βBagaimana cara memasang Pi-hole di Raspberry Pi saya menggunakan Docker?β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Pi-hole mencegat semua permintaan internet dari jaringan Anda. Alat ini memeriksa apakah situs yang diminta ada dalam daftar blokir. Jika ada, situs tersebut diblokir. Jika tidak, permintaan diteruskan ke internet.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Homelab Pi-hole DNS
Pi-hole is a network-wide DNS ad blocker that runs on a Raspberry Pi or any Linux host. Every device on your network gets ad and malware domain blocking automatically β no browser extension needed.
When to Use
- Installing Pi-hole on a Raspberry Pi or Linux host
- Configuring Pi-hole as the DNS server for a home network
- Adding or managing blocklists
- Setting up DNS-over-HTTPS (DoH) upstream resolvers
- Creating local DNS records (e.g.
nas.home.lan,pi.home.lan) - Troubleshooting devices that lose internet access after Pi-hole is installed
- Running Pi-hole alongside or instead of DHCP
How Pi-hole Works
Normal flow (without Pi-hole):
Device β requests ads.tracker.com β ISP DNS β real IP β ads load
With Pi-hole:
Device β requests ads.tracker.com β Pi-hole DNS β blocked (returns 0.0.0.0) β no ad
All DNS queries go through Pi-hole first.
Pi-hole checks against blocklists.
Blocked domains return a null response β the ad/tracker never loads.
Allowed domains get forwarded to your upstream resolver (Cloudflare, Google, etc.).
Installation
Docker (Recommended)
Docker is the easiest way to install Pi-hole and makes updates and backups straightforward.
# docker-compose.yml
services:
pihole:
image: pihole/pihole:<pinned-release-tag>
container_name: pihole
ports:
- "53:53/tcp"
- "53:53/udp"
- "80:80/tcp" # Web admin
environment:
TZ: "America/New_York"
WEBPASSWORD: "${PIHOLE_WEBPASSWORD}" # set via .env file or secret
PIHOLE_DNS_: "1.1.1.1;1.0.0.1"
DNSMASQ_LISTENING: "all"
volumes:
- "./etc-pihole:/etc/pihole"
- "./etc-dnsmasq.d:/etc/dnsmasq.d"
restart: unless-stopped
cap_add:
- NET_ADMIN # only needed if Pi-hole will serve DHCP
Replace <pinned-release-tag> with a current Pi-hole release tag before deploying.
Avoid latest for long-lived DNS infrastructure so upgrades are deliberate and
reviewable.
Set PIHOLE_WEBPASSWORD in a .env file next to docker-compose.yml, chmod it to
600, and keep it out of git β do not put the password directly in the compose file.
Access web admin at: http://<pi-ip>/admin
Bare-Metal Install (Raspberry Pi OS / Debian / Ubuntu)
Pi-hole requires a static IP before installing.
# Step 1: Assign a static IP (edit /etc/dhcpcd.conf on Pi OS)
sudo nano /etc/dhcpcd.conf
# Add at the bottom:
interface eth0
static ip_address=192.168.3.2/24
static routers=192.168.3.1
static domain_name_servers=192.168.3.1
# Step 2: Download and inspect the installer before running it.
# Prefer the package or installer path documented by Pi-hole for your OS/version.
curl -sSL https://install.pi-hole.net -o pi-hole-install.sh
less pi-hole-install.sh # review before proceeding
# Step 3: Run
bash pi-hole-install.sh
# Follow the interactive installer:
# 1. Select network interface (eth0 for wired β recommended)
# 2. Select upstream DNS (Cloudflare or leave default β can change later)
# 3. Confirm static IP
# 4. Install the web admin interface (recommended)
# 5. Note the admin password shown at the end
Pointing Your Network at Pi-hole
# Method 1: Change DNS in your router DHCP settings (recommended)
Router admin UI β DHCP Settings β DNS Server
Primary DNS: 192.168.3.2 (Pi-hole IP)
Secondary DNS: leave blank for strict blocking, or use a second Pi-hole.
A public fallback such as 1.1.1.1 improves availability during
rollout but can bypass blocking because clients may query it.
All devices get Pi-hole as DNS automatically on next DHCP renewal.
Force renewal: reconnect Wi-Fi or run 'sudo dhclient -r && sudo dhclient' on Linux
# Method 2: Per-device DNS (useful for testing before network-wide rollout)
Windows: Control Panel β Network Adapter β IPv4 Properties β set DNS manually
macOS: System Settings β Network β Details β DNS β set manually
Linux: /etc/resolv.conf or NetworkManager
# Method 3: Pi-hole as DHCP server (replaces router DHCP)
Pi-hole admin β Settings β DHCP β Enable
Disable DHCP on your router first β two DHCP servers on the same network cause conflicts
Advantage: hostname resolution works automatically (devices register their names)
Blocklist Management
# Pi-hole admin β Adlists β Add new adlist
# Recommended blocklists:
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
# default β 200k+ domains
β¦
Pertanyaan umum
Apa itu server DNS?
Server DNS ibarat buku telepon untuk internet. Server ini menerjemahkan nama situs web (seperti google.com) menjadi alamat numerik (IP) yang bisa dipahami komputer.
Apa itu daftar blokir (blocklist)?
Daftar blokir berisi alamat situs web yang diketahui menampilkan iklan atau melacak pengguna. Pi-hole menggunakan daftar ini untuk menentukan situs mana yang harus diblokir.
Bisakah saya menggunakan Pi-hole untuk lebih dari satu perangkat?
Bisa. Pi-hole dirancang untuk melindungi seluruh jaringan rumah Anda. Setelah dipasang di router, semua perangkat yang terhubung ke router tersebut akan mendapatkan manfaat dari pemblokiran ini.
Detail
Deskripsi asli dari pembuat
Pi-hole installation, blocklist management, DNS-over-HTTPS setup, DHCP integration, local DNS records, and troubleshooting broken DNS resolution on a home network. Use when the task explicitly involves Pi-hole β installing it, managing blocklists, configuring DoH or DHCP, adding local DNS records, or diagnosing DNS resolution with Pi-hole in the path.
repo: affaan-m/ECC
Popularitas
- Bintang GitHub
- 280k
- Peringkat
- #333
- Lisensi
- MIT
- Diperbarui
- 15/10/2026
Komentar
- β¦
Skill lain dari repositori ini
accessibility
280kMembantu agent Anda membuat antarmuka yang ramah untuk semua orang. Memastikan website dan aplikasi tetap bisa dipakai penyandang disabilitas, seperti tunanetra.
agent-architecture-audit
280kMembuat agent Anda memeriksa apakah semuanya berjalan dengan benar. Agent akan menemukan dan memperbaiki masalah pada sistem AI agar bekerja sesuai harapan.
agent-eval
280kMembantu agent Anda membandingkan berbagai alat coding AI. Mengukur mana yang lebih cepat, lebih murah, dan lebih andal untuk tugas tertentu.
agent-harness-construction
280kMembuat agent Anda lebih memahami cara menyelesaikan tugas. Agent mengoptimalkan alat dan instruksi yang digunakan agar peluang berhasilnya lebih besar.
Skill serupa
openclaw-update
394kMembantu agent Anda memperbarui OpenClaw Gateway yang sudah ada, dengan memilih metode pembaruan yang sesuai cara pemasangannya dan menjaga sesi Anda tetap berjalan.
diagnose-gateway
394kMembantu agent Anda mencari tahu mengapa OpenClaw Gateway gagal dengan memeriksa pengaturan, channel, dan port tanpa mengubah apa pun.
crabbox-apps
394kMembantu agent Anda membuka dan menjalankan aplikasi di mesin cloud sementara, lalu menampilkan tampilannya di panel samping chat Anda.