With Pi-Hole you can get rid of Ads for all your devices within your local network. It works, like Ad-Away for Android, as DNS-Filter. Domains on downloadable Blacklists are blocked and overmore a Pi-Hole works as gateway to a DNS-Server of you choice (e.g. from Digital Courage). Pi-Hole is slick and comes with a neat webinterface.
To install simply type on your Raspbian or even Debian:
curl -sSL https://install.pi-hole.net | bash
After the installation make sure to make your devices find Pi-Hole as DNS-Server within the LAN. This can be done in the settings of your router.
Local DNS Server with unbound
If you want to use a local DNS-Server as source for Pi-Hole you can use unbound. Here is the link to the instructions
https://docs.pi-hole.net/guides/dns/unbound/
Local names of machines
If you want to access your internal machines with their names instead of IP-Addresses make sure you enable the LAN-DNS Server functionality fully:
echo "addn-hosts=/etc/pihole/lan.list" | sudo tee /etc/dnsmasq.d/02-lan.conf
After this, create a “hosts file” for your network /etc/pihole/lan.list
with the format ipaddress fqdn hostname
, eg:
10.42.23.40 fritz.your.lan fritz
10.42.23.41 franz.your.lan franz
10.42.23.42 friedel.your.lan friedel
and finally:
sudo pihole restartdns
Update Pi-Hole
Use this shell-script in crontab to update your pi-hole regularly:
#!/bin/bash
apt update -q4
apt upgrade -V
apt autoremove -y
apt autoclean -y
pihole -up
exit 0
Reset password
use this command to reset your password on to the pi-hole interface:
pihole -a -p
2 Responses
[…] wondered why german ads still keep popping up even though you are using pi-hole […]
[…] Pi-Hole which is running on a VM has now about 1 million entries in its […]