Cyber Security Raspberry Pi

The power of Pi to block Ads

I don’t know about you but I hate adverts in games and a while ago I setup a Raspberry Pi with pi-hole to blocks Ads and other rubbish. I’m so used to Ads being blocked at home, that I forger how annoying them are when I am out of the house. So, how did I do it? In the post I’ll tell you how to set it up.

Step 1: Gather your materials

To get started, you’ll need a Raspberry Pi (any model will do!) and a microSD card with the Raspbian operating system installed. Make sure your Raspberry Pi is connected to the internet and you’re all set! I have it running on a Raspberry Pi 3 but you don’t need anything massive.

Step 2: Update and upgrade your Raspberry Pi

Before we begin, it’s always a good idea to make sure your Raspberry Pi is running the latest software and security updates. Run the following commands in the terminal:

sudo apt-get update
sudo apt-get upgrade

Step 3: Install Pi-hole Installing Pi-hole is as easy as running one command in the terminal. Just copy and paste the following command:

curl -sSL https://install.pi-hole.net | bash

This command will begin the installation process and prompt you to select your network interface and enter your preferred DNS server.

Step 4: Log in to the web interface

Once Pi-hole is installed, you can access the web interface by visiting http://<your-pi-ip-address>/admin in your web browser.

Step 5: Set your password

The first time you log in, you will be prompted to set a password for the web interface. This password will be used to secure the web interface, so make sure to choose a strong and unique password.

Step 6: Log in

After you’ve set your password, you can log in by entering your Pi-hole’s IP address and the password you just set in the web browser.

That’s it! You’re now logged in to the Pi-hole web interface and ready to start configuring your ad-blocker and DNS settings.

Step 6: Configure DHCP settings

In the Pi-hole web interface, navigate to the “Settings” tab and select “DHCP.” Here, you can configure your DHCP settings to automatically assign the IP address of your Raspberry Pi as the DNS server for all devices connected to your network.

Step 7: Configure DNS settings

In the Pi-hole web interface, navigate to the “Settings” tab and select “DNS.” Here, you can configure your DNS settings to use the Pi-hole ad-blocker as the primary DNS server. You can also add additional DNS servers as backups.

Step 8: Test your configuration

To test that your DHCP and DNS settings are configured correctly, you can use the “nslookup” command in the terminal to check that your Raspberry Pi is correctly resolving DNS queries.

Step 9: Apply the settings on your router

If you’re using a router, you’ll need to configure your router to use the Raspberry Pi as the DHCP and DNS server. This can typically be done by logging into your router’s web interface and adjusting the settings accordingly.

And that’s it! You now have a fully functional Pi-hole ad-blocker and DNS server running on your Raspberry Pi. With this setup, your browsing experience will be faster and more secure, and all the devices on your network will be protected from ads and unwanted domains. I’m amazed at how quickly those annoying Ads are stopped, but there is a twist, by default it stops google ads as well, so if you search and adverts come up that you might want to click on, they will be blocked. However, I will cover off how to fix that and add exceptions in a later post.

Leave a Reply

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