So, I got a Raspberry Pi a few years ago and couldn’t think of any worthwhile projects to do with it. I am not sure how I came across it, but then I found out about PiHole(Website). I was curious and decided to give it a try. I was blown away at how much traffic it intercepted from websites/smart devices/etc from my own home. I decided to blog about how I set it up, mainly because I have two different methods. I will discuss the second method on my next blog.

Materials Needed:
1x Raspberry Pi
1x MicroSD card(PiHole recommends at least 2GB for its installation, I am using a 16GB card)
1x Admin login to your Router
Raspberry Pi Imaging Tool(Website)

  1. So the first thing you will need to do is download the Raspberry Pi Imager tool. Download that from the link above for the OS of your choice.
  2. Once downloaded, go ahead and open the application.
  3. Choose the Raspberry Pi device you are using
  4. Choose the OS you would like to use for your device. In this blog, I will be using Ubuntu Server 23.10 64-Bit
  5. Then choose the storage device(your MicroSD card)
  6. Once all options have been configured, go ahead and click “Write”. It should prompt you that all of the data on the drive is going to be deleted, just click yes.


  7. Once the files are done being written, go ahead and put the MicroSD card into your Raspberry Pi device, connect a network cable(unless you are going to use wireless which I don’t go into setting up), a keyboard, monitor, and then finally the micro usb power cable.Let the system boot up until you are prompted for your login setup. Go ahead and login to the device.



  8. Once you are logged in, you should run: sudo apt install net-tools. If prompted for root password, put in the password you created for your user. This will install tools needed to get the IP information for your device. Once installed, run ifconfig and get your local private IP Address and save it for later.
  9. Install curl by typing the following command: sudo apt install curl. Once again, input the password for your user account if prompted. Press “y” to accept.
  10. Install PiHole by typing this command: curl -sSL https://install.pi-hole.net | bash
  11. As the installer progresses, I normally use all of the defaults. Make sure you choose yes for the web page admin option. This will come in handy. When the installer finishes, it will generate a unique password for this website, WRITE IT DOWN!
  12. To check and make sure everything is funtioning right, go ahead and open up a web browser, and type in the ip address of your Raspberry Pi device, with a /admin at the end. Ex: 192.168.68.24/admin
  13. Use the password you wrote down in step 12 to login to your PiHole.
  14. The next step varies for whatever router you have at your home. But you want to edit the DNS settings in your router to a static value to your Raspberry Pi device. All of your local DNS requests should filter through this PiHole so that it can block out any unwanted ads. You may need to restart your router/pc/phones for it all to take effect.
  15. Once you have the DNS entries updated, watch the admin site and see how many queries get blocked in such a short time. In my home, Roku, Nest, and my LG SmartTV are the highest hitters.




  16. That’s it! Enjoy your ad free internet browsing.

PS: Some sites do NOT like the use of Ad blockers, and will not let you browse their sites with them enabled. You have two choices here: 1) Whitelist the site in PiHole, or 2) You can pause the ad blocking while you browse the site, then restart it once finished.

My next post will be how to use PiHole if you do NOT have a Raspberry Pi at home, but do have the ability to create a virtual machine in Hyper-V!

By admin

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.