Ban Ads for all your local devices with Pi-Hole

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.

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

1 thought on “Ban Ads for all your local devices with Pi-Hole

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.