Pi Hole on Raspberry (Block Advertisements)
7 juni 2021
/
Pi-Hole: The network-wide Ad Blocking webbased app.
Pi-hole or Pihole is a Linux network-level advertisment and Internet tracker blocking application which acts as a DNS sinkhole, intended for use on a private network.
It is designed for low-power embedded devices with network capability, such as your Rapsberry Pi ;-) but supports any Linux machine.
Pi-hole has the ability to block traditional website advertisements as well as advertisements in unconventional places, such as smart TV’s and mobile operating system advertisements.
Now that you where we use Pi-hole for it’s time to install it on our Raspberry.
For this howto I assume your Raspberry is already up and running and reachable on your network using SSH on a static IP Address.
If you still need some work done, check the other articles to help you started.
login on your Raspberry Pi using SSH and install Pi-Hole.
sudo curl -sSL https://install.pi-hole.net | bash
This installer will transform your
device into a network-wide ad blocker!
The Pi-hole is free, but powered by your
donations: https://pi-hole.net/donate/
The Pi-hole is a SERVER so it needs a STATIC IP ADDRESS
to function properly.
In the next section, you can choose to use your current
network settings (DHCP) or to manually edit them.
Select Upstream DNS Provider. To use your own, select
Custom.
OpenDNS (ECS, DNSSEC)
Pi-hole relies on third party lists in order to
block ads. You can use the suggestion below,
and/or add your own after installation
To deselect the suggested list, use spacebar
[*] StevenBlack StevenBlack's Unified Hosts List
Select Protocols (press space to toggle selection)
[*] IPv4 Block ads over IPv4
[ ] IPv6 Block ads over IPv6
Do you want to use your current network settings
as a static address?
IP address: 192.168.2.250/24
Gateway: 192.168.2.254
It is possible your router could still try to assign
this IP to a device, which would cause a conflict.
But in most cases the router is smart enough to not
do that.
[...]
Do you wish to install the web admin interface?
(*) On (Recommended)
( ) Off
Do you wish to install the web server (lighttpd)
and required PHP modules?
[...]
(*) On (Recommended)
( ) Off
Do you want to log queries?
(*) On (Recommended)
( ) Off
Select a privacy mode for FTL.
https://docs.pi-hole.net/ftldns/privacylevels/
(*) 0 Show everything
( ) 1 Hide domains
( ) 2 Hide domains and clients
( ) 3 Anonymous mode
Installation complete. It's that easy. Now in to your router/DHCP server and make sure all the clients get the Pi-Hole as DNS server.
If you made your Pi the DHCP server continue and login to the admin console using the login password showed to you in the last step.
Configure your devices to use the Pi-hole as their
DNS server using:
IPv4: 192.168.2.250
IPv6: Not Configured
If you set a new IP address, you should restart
the Pi.
The install log is in /etc/pihole.
View the web interface at http://pi.hole/admin or
http://192.168.2.250/admin
Your Admin Webpage login password is xAxBxCx3X
Now that the Pi-Hole is installed you can continue improving settings. Perhaps a good setting is to add the openDNs Familie shield ip's to block adult content. You can add these ip's under Settings - DNS as a first and second Upstream DNS Server.
Much more to see, learn and tune. Have fun browsing safe and ad-free on the web.
Check https://obutterbach.medium.com/unlock-the-full-potential-of-pihole-e795342e0e36 for more info on blocking ads and more!