Hi everyone this thime I’d like to show you a pretty cool and usefull project with Raspberry Pi, I’m talking about Pi Hole. Pi Hole is a software that you can install on Raspbian OS that allows you to block most of ads on the network, in my opinion is very usefull because you can use it with all your device at home simply with only one istallation on the Raspberry Pi because trasform it into a network-wide ad blocker and also improve your network speed! If you want more information check Pi Hole web page.
Pi Hole Hardware Setup
All that you need is a Raspberry Pi with fresh installation of Raspbian OS, if you don’t know how to do that check my Beginning page when I explain you step by step how to install it with all OS (Windows/MAC/Linux).
Pi Hole Software Setup
Once you have booted up your Pi open the terminal and type:
sudo apt-get update curl -sSL https://install.pi-hole.net | bash
The fist command needs to update all Raspbain repository and the second allows you to install Pi Hole software. When the installation starts the first thing that you can choose is the interface, I recomend to use eth0 because when the Pi is connected through ethernet with your router you have lower latency. After that select as Upstream DNS provider Google and leave default third part list.
At the end of installation take notes about IP address and admin password!
Now you need to go on the admin router page usually is at 192.168.1.1 or 18.104.22.168, type it in browser search tab and log in with your credentials (usually the default is admin/admin). When you logged in give a Pi a reserved static IP address in order to use Pi Hole with all your device automatically. If you don’t know how to do that check your router manual and you can find all the steps (I can’t do it because this procedure change router by router).
The last thing that you need to do is setting up your reserved Pi’s IP address as DNS in your PC/Smartphone/Tablet, set up as primary DNS your Pi’s IP address and as second Google DNS (22.214.171.124). In windows for example go into Network Connection Setting, click on your connection, select Properties and double click on Internet Protocol Version 4 voice, in this windows you can change your DNS.
All it’s done! Now if you try to navigate on a website you can notice that all the ads are blocked. You can change some setting and control how the Pi Hole is working going into your Pi’s IP address (put it in the browser search bar), in the admin pannel you can see some statistic about the ads that Pi Hole is blocking for you!