{"id":90,"date":"2022-10-11T16:25:00","date_gmt":"2022-10-12T02:25:00","guid":{"rendered":"https:\/\/wroberts.me\/?p=90"},"modified":"2022-12-08T09:07:58","modified_gmt":"2022-12-08T19:07:58","slug":"pihole","status":"publish","type":"post","link":"https:\/\/wroberts.me\/?p=90","title":{"rendered":"Pihole &#8211; Ad Blocker for Your Entire Network"},"content":{"rendered":"\n<p id=\"bkmrk-pihole-is-a-network-\">Do you use an adblocker? If you do, you&#8217;re likely using one through a browser extension such as ublock origin.&nbsp; Adblockers are a great thing; they make browsing the internet much more tolerable. What if there was a way to block ads for everything on your network, including those annoying little ads on apps&nbsp; for your phone?<\/p>\n\n\n\n<p id=\"bkmrk-enter-pihole%2C-a-netw\">Enter Pihole, a network wide ad blocker. Pihole acts as a DNS sinkhole where DNS queries from blacklisted domain are sent to your pihole server instead of your device. But, what does that exactly mean? First, a quick overview of DNS.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"bkmrk-dns-overview\"><span class=\"ez-toc-section\" id=\"DNS_Overview\"><\/span>DNS Overview<span class=\"ez-toc-section-end\"><\/span><\/h3><div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/wroberts.me\/?p=90\/#DNS_Overview\" >DNS Overview<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/wroberts.me\/?p=90\/#How_Pihole_Works\" >How Pihole Works<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/wroberts.me\/?p=90\/#Pihole_Installation\" >Pihole Installation<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n\n<p id=\"bkmrk-dns-stands-for-domai\">DNS stands for Domain Name System. The purpose of DNS is to resolve domain names to their IP addresses. A domain name is what we&#8217;re all familiar with when visiting websites. Examples would be https:\/\/www.twitter.com or https:\/\/www.youtube.com.<\/p>\n\n\n\n<p id=\"bkmrk-however%2C-data-is-rou\">However, data is routed through networks using IP addresses, not domain names. So, when you type in a website into your browser, it needs to make a request to a DNS server to see if it has the IP address for a given domain. Once the DNS replies with the IP address, your device is able to reach the website.<\/p>\n\n\n\n<p id=\"bkmrk-dns-is-convenient-fo\">DNS is convenient for us humans because it allows us to not have to remember the IP address of every website we visit. Instead of having to type 142.251.33.110, you can just type in google.com. Imagine having to remember some string of numbers for every website you have to visit. You can think of DNS acting similar to your contact list in your phone. You map peoples&#8217; phone number to their name so you don&#8217;t have to remember the phone number of every single person you know.<\/p>\n\n\n\n<p id=\"bkmrk-normally%2C\">The below diagram shows a more detailed look at how DNS works. There are actually several DNS servers involved when resolving a domain name. Here&#8217;s the basic outline of the process:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/www.cloudflare.com\/img\/learning\/dns\/what-is-dns\/dns-lookup-diagram.png\" alt=\"DNS query diagram\"\/><figcaption class=\"wp-element-caption\">Credit: Cloudflare.com<\/figcaption><\/figure>\n<\/div>\n\n\n<p id=\"bkmrk-credit%3A-cloudflare.c\"><\/p>\n\n\n\n<ol class=\"wp-block-list\" id=\"bkmrk-you-type-a-website-n\">\n<li>You type a website name and a request is sent to your local DNS server. On your home network, this is usually your router.<\/li>\n\n\n\n<li>Your local DNS server makes a request to it&#8217;s configured root server.<\/li>\n\n\n\n<li>The root server replies with the address of a Top Level Domain (TLD) server. A top level domain is what is placed at the end or web addresses such as .com, .org, or .net. For example, a request to twitter.com would get end up getting forwarded to the .com TLD server.<\/li>\n\n\n\n<li>A request is made to the TLD server.<\/li>\n\n\n\n<li>The TLD server sends the address of the website&#8217;s authoritative name server where its DNS records are stored.<\/li>\n\n\n\n<li>A request is made to the name server of the requested site.<\/li>\n\n\n\n<li>The name server replies with the IP address of the requested site to the local DNS server.<\/li>\n\n\n\n<li>The local DNS server provides the result to the local machine and the answer is cached.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"bkmrk-how-pihole-works\"><span class=\"ez-toc-section\" id=\"How_Pihole_Works\"><\/span>How Pihole Works<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p id=\"bkmrk-pihole-acts-as-the-d\">Pihole acts as the DNS server for your local network. Instead of only resolving DNS queries like your router would, pihole uses blocklists to determine if a request gets sent out of the network to be resolved.&nbsp; If a DNS query from a machine matches a domain on the blocklist, the domain is pointed to the pihole&#8217;s IP address instead of it&#8217;s actual IP address, resulting in it being &#8220;blocked&#8221; or not showing up on the client device.&nbsp;&nbsp; Whitelisted domains get forwarded to an upstream DNS server to continue the domain resolution process as normal.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/brianchristner.io\/content\/images\/size\/w2000\/2019\/03\/pihole-traditional-dns-1024x630-1.png\" alt=\"How a Single Raspberry Pi made my Home Network Faster\"\/><figcaption class=\"wp-element-caption\">Credit: BrianChristner.io<\/figcaption><\/figure>\n<\/div>\n\n\n<p id=\"bkmrk-credit%3A-brianchristn\"><\/p>\n\n\n\n<p id=\"bkmrk-of-course%2C-you%27re-no\">Of course, you&#8217;re not typing in the domains of advertisers into your web browser. What happens is during the DNS resolution process, other servers not related to the DNS resolution process get involved and their data gets attached in the exchange. Some of this data is for advertisers and other content providers. This data contains domains that under normal circumstances get resolved to their associated IP address and show up as ads on your device. However, if any of these domains are on the pihole&#8217;s blocklist, their IP address is resolved beforehand to the pihole server&#8217;s IP address before the DNS query leaves your network. It effectively ignores these domains&#8217; IP resolution, leaving only the initial DNS query&#8217;s being shown on the requested machine.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"bkmrk-pihole-installation\"><span class=\"ez-toc-section\" id=\"Pihole_Installation\"><\/span>Pihole Installation<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p id=\"bkmrk-this-will-be-an-inst\">This will be an installation on a Windows system. For this installation, you will need:<\/p>\n\n\n\n<ol class=\"wp-block-list\" id=\"bkmrk-raspberry-pi-%28any-mo\">\n<li>Raspberry Pi (Any model will work, I am installing this on a Raspberry Pi Zero)<\/li>\n\n\n\n<li>USB to Ethernet Adapter (If using a Raspberry Pi Zero and want a wired connection)<\/li>\n\n\n\n<li>SD Card<\/li>\n\n\n\n<li>USB SD Card adapter<\/li>\n<\/ol>\n\n\n\n<p id=\"bkmrk-since-i%27m-going-to-i\">Since I&#8217;m going to install this on a Raspberry Pi, I&#8217;m going to use the Raspberry Pi Imager. The Raspbery Pi Imager allows you to configure the initial pihole settings before flashing the SD card, making setting up the server much simpler.<\/p>\n\n\n\n<p id=\"bkmrk-first-download-the-s\">First download the software at&nbsp;<a href=\"https:\/\/www.raspberrypi.com\/software\/\">https:\/\/www.raspberrypi.com\/software<\/a><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"393\" src=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-324.png\" alt=\"\" class=\"wp-image-523\" srcset=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-324.png 624w, https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-324-300x189.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n<\/div>\n\n\n<p id=\"bkmrk-run-the-executable\">After downloading, run the executable<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"489\" height=\"381\" src=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-321.png\" alt=\"\" class=\"wp-image-519\" srcset=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-321.png 489w, https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-321-300x234.png 300w\" sizes=\"auto, (max-width: 489px) 100vw, 489px\" \/><\/figure>\n<\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"589\" height=\"460\" src=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-323.png\" alt=\"\" class=\"wp-image-521\" srcset=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-323.png 589w, https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-323-300x234.png 300w\" sizes=\"auto, (max-width: 589px) 100vw, 589px\" \/><\/figure>\n<\/div>\n\n\n<p id=\"bkmrk-click-choose-os-sele\">Next, click choose OS,&nbsp; then select Raspberry Pi OS (other), I chose raspberry pi lite since this will installed on a pi zero.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"393\" src=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-324.png\" alt=\"\" class=\"wp-image-522\" srcset=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-324.png 624w, https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-324-300x189.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n<\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"414\" src=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-320.png\" alt=\"\" class=\"wp-image-518\" srcset=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-320.png 624w, https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-320-300x199.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n<\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"597\" height=\"342\" src=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-319.png\" alt=\"\" class=\"wp-image-517\" srcset=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-319.png 597w, https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-319-300x172.png 300w\" sizes=\"auto, (max-width: 597px) 100vw, 597px\" \/><\/figure>\n<\/div>\n\n\n<p id=\"bkmrk-make-sure-your-sd-ca\">Make sure your SD card is inserted and choose storage of media you want to install. This machine is going to be configured without a monitor so next we need to make sure we have the ability to do that. Click the gear icon in the bottom right corner<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"414\" src=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-322.png\" alt=\"\" class=\"wp-image-520\" srcset=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-322.png 624w, https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-322-300x199.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n<\/div>\n\n\n<p id=\"bkmrk-set-a-name-for-the-m\">Set a name for the machine and click to enable ssh. Scroll down and set a username and password. Remember these credentials. Configure WLAN if you plan to use wireless for your setup. When done, hit save.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"414\" src=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-325.png\" alt=\"\" class=\"wp-image-524\" srcset=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-325.png 624w, https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-325-300x199.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n<\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"414\" src=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-325.png\" alt=\"\" class=\"wp-image-525\" srcset=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-325.png 624w, https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-325-300x199.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n<\/div>\n\n\n<p id=\"bkmrk-save-settings-and-th\">Save settings and then hit write.&nbsp;<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"414\" src=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-326.png\" alt=\"\" class=\"wp-image-526\" srcset=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-326.png 624w, https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-326-300x199.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n<\/div>\n\n\n<p id=\"bkmrk-plug-in-the-pi.-this\">Plug in the pi. This will be a headless installation so we\u2019re going to need the IP address of the machine so we can ssh into it. To get the IP, I\u2019m going to log into my router and check the attached devices. How to do this varies by router but in general, there should be a tab in the menu bar for attached devices. In the table, I can see the pi\u2019s IP is 10.0.0.6.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"69\" src=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-327.png\" alt=\"\" class=\"wp-image-527\" srcset=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-327.png 624w, https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-327-300x33.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n<\/div>\n\n\n<p id=\"bkmrk-for-pihole-to-work-c\">For pihole to work correctly, it needs a static IP. To ensure its IP doesn\u2019t change, I\u2019m going to reserve it. For my router, I went to \u201cLan Setup\u201d, then hit \u201cadd\u201d under Address Reservation.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"126\" src=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-328.png\" alt=\"\" class=\"wp-image-528\" srcset=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-328.png 624w, https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-328-300x61.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n<\/div>\n\n\n<p id=\"bkmrk-then%2C-i-selected-the\">Then, I selected the button for the PIHOLE then clicked add. The device name seen is different because this screen is using the hostname instead.<\/p>\n\n\n\n<p id=\"bkmrk-now%2C-i%E2%80%99ll-ssh-into-t\">Now, I\u2019ll ssh into the machine using the username created earlier.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"532\" src=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-330.png\" alt=\"\" class=\"wp-image-530\" srcset=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-330.png 624w, https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-330-300x256.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n<\/div>\n\n\n<p id=\"bkmrk-update-the-system-wi\">Update the system with the following command:<\/p>\n\n\n\n<pre id=\"bkmrk-sudo-apt-update-%26%26-s\" class=\"wp-block-code\"><code>sudo apt update &amp;&amp; sudo apt upgrade -y.<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"484\" src=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-343.png\" alt=\"\" class=\"wp-image-543\" srcset=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-343.png 624w, https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-343-300x233.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n<\/div>\n\n\n<p id=\"bkmrk-install-pihole-with-\">Install pihole with:<\/p>\n\n\n\n<pre id=\"bkmrk-curl--ssl-https%3A%2F%2Fin\" class=\"wp-block-code\"><code> curl  -sSL https:\/\/install.pi-hole.net | bash.<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"484\" src=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-335.png\" alt=\"\" class=\"wp-image-535\" srcset=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-335.png 624w, https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-335-300x233.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n<\/div>\n\n\n<p id=\"bkmrk-run-the-script-and-w\">Run the script and wait for the pihole installer to start. It may take a few minutes.<\/p>\n\n\n\n<p id=\"bkmrk-click-ok.-0\">Click OK.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"395\" src=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-334.png\" alt=\"\" class=\"wp-image-534\" srcset=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-334.png 624w, https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-334-300x190.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n<\/div>\n\n\n<p id=\"bkmrk-this-is-why-we-set-a\">This is why we set a static IP earlier. Click continue.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"395\" src=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-331.png\" alt=\"\" class=\"wp-image-531\" srcset=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-331.png 624w, https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-331-300x190.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n<\/div>\n\n\n<p id=\"bkmrk-this-is-a-wired-conn\">This is a wired connection so I\u2019ll choose eth0.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"395\" src=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-329.png\" alt=\"\" class=\"wp-image-529\" srcset=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-329.png 624w, https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-329-300x190.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n<\/div>\n\n\n<p id=\"bkmrk-the-ip-address%2C-netm\">The IP address, netmask, and gateway are all correct so I\u2019ll hit continue.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"395\" src=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-342.png\" alt=\"\" class=\"wp-image-542\" srcset=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-342.png 624w, https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-342-300x190.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n<\/div>\n\n\n<p id=\"bkmrk-choose-an-upstream-d\">Choose an upstream DNS provider. This is what will resolve domain names for the internet.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"395\" src=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-332.png\" alt=\"\" class=\"wp-image-532\" srcset=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-332.png 624w, https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-332-300x190.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n<\/div>\n\n\n<p id=\"bkmrk-pihole-needs-lists-t\">Pihole needs lists to function. Choose yes. More lists can be added later.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"395\" src=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-333.png\" alt=\"\" class=\"wp-image-533\" srcset=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-333.png 624w, https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-333-300x190.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n<\/div>\n\n\n<p id=\"bkmrk-click-yes-to-install\">Click yes to install the web interface.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"395\" src=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-336.png\" alt=\"\" class=\"wp-image-536\" srcset=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-336.png 624w, https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-336-300x190.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n<\/div>\n\n\n<p id=\"bkmrk-install-the-modules--0\">Install the modules for the web interface<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"395\" src=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-341.png\" alt=\"\" class=\"wp-image-541\" srcset=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-341.png 624w, https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-341-300x190.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n<\/div>\n\n\n<p id=\"bkmrk-enable-logging.\">Enable logging.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"395\" src=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-337.png\" alt=\"\" class=\"wp-image-537\" srcset=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-337.png 624w, https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-337-300x190.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n<\/div>\n\n\n<p id=\"bkmrk-enable-logging-0\">Choose the level of detail wanted for logs.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"395\" src=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-338.png\" alt=\"\" class=\"wp-image-538\" srcset=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-338.png 624w, https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-338-300x190.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n<\/div>\n\n\n<p id=\"bkmrk-the-installation-is-\">The installation is done. Make note of the password so you can access the web interface.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"395\" src=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-344.png\" alt=\"\" class=\"wp-image-544\" srcset=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-344.png 624w, https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-344-300x190.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n<\/div>\n\n\n<p id=\"bkmrk-%C2%A0-29\">Open a web browser to log in to the interface. You can use either the IP address of the server or the hostname assigned to the device when writing the Iso to the SD card. In my case, the address will be&nbsp;<a href=\"http:\/\/pihole.local\/admin\">http:\/\/pihole.local\/admin<\/a>, where pihole.local is the assigned hostname of my device.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"471\" src=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-340.png\" alt=\"\" class=\"wp-image-540\" srcset=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-340.png 624w, https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-340-300x226.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n<\/div>\n\n\n<p id=\"bkmrk-open-a-web-browser-t\">This is the dashboard. Take a look around. You can see under &#8220;Domains on Adlists&#8221; already has 151,072 domains. These are the number of domains on the blocklist from the initial installation.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"471\" src=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-339.png\" alt=\"\" class=\"wp-image-539\" srcset=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-339.png 624w, https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-339-300x226.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n<\/div>\n\n\n<p id=\"bkmrk-next-step-is-changin\">Before continuing, let&#8217;s change the password of the web interface. Back in the shell, type in pihole -a \u2013p. Then type in your new password.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"395\" src=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-345.png\" alt=\"\" class=\"wp-image-545\" srcset=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-345.png 624w, https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-345-300x190.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n<\/div>\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"379\" src=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-347.png\" alt=\"\" class=\"wp-image-547\" srcset=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-347.png 624w, https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-347-300x182.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n<\/div>\n\n\n<p id=\"bkmrk-now-that-pihole-is-i\">Now that pihole is installed and the web interface is enabled, the final step is to have other devices on the network use pihole as their DNS server. Most likely, the devices on your network are using your router as their DNS server. Instead of changing each device to point their DNS queries to the pihole server, we&#8217;re going to have our router use the pihole server as its DNS server.<\/p>\n\n\n\n<p id=\"bkmrk-back-in-my-router%2C-i\">Back in my router, I changed the settings to only Pihole as the DNS server. Now, all DNS requests from devices on the network will go to the router which will then get forwarded to the pihole server.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"50\" src=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-346.png\" alt=\"\" class=\"wp-image-546\" srcset=\"https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-346.png 624w, https:\/\/wroberts.me\/wp-content\/uploads\/2022\/11\/image-346-300x24.png 300w\" sizes=\"auto, (max-width: 624px) 100vw, 624px\" \/><\/figure>\n<\/div>\n\n\n<p id=\"bkmrk-and-now%2C-our-new-net\">And now, our new network-wide ad blocking server is ready.<\/p>\n\n\n\n<p id=\"bkmrk-in-a-future-post%2C-we\">In a future post, we&#8217;ll use the local DNS feature of pihole so the other services on the network can reached with easy to remember names instead of IP addresses. We&#8217;ll also set up pihole as a recursive DNS server so our pihole server will handle upstream DNS requests as well.<\/p>\n\n\n\n<p id=\"bkmrk-pihole-as-an-ad-bloc\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Do you use an adblocker? If you do, you&#8217;re likely using one through a browser extension such as ublock origin.&nbsp; Adblockers are a great thing; they make browsing the internet much more tolerable. What if there was a way to block ads for everything on your network, including those annoying little ads on apps&nbsp; for &#8230; <a href=\"https:\/\/wroberts.me\/?p=90\" class=\"more-link\">Read More<span class=\"screen-reader-text\"> &#8220;Pihole &#8211; Ad Blocker for Your Entire Network&#8221;<\/span> &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":515,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"series":[],"class_list":["post-90","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-home-lab"],"_links":{"self":[{"href":"https:\/\/wroberts.me\/index.php?rest_route=\/wp\/v2\/posts\/90","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wroberts.me\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wroberts.me\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wroberts.me\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wroberts.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=90"}],"version-history":[{"count":10,"href":"https:\/\/wroberts.me\/index.php?rest_route=\/wp\/v2\/posts\/90\/revisions"}],"predecessor-version":[{"id":847,"href":"https:\/\/wroberts.me\/index.php?rest_route=\/wp\/v2\/posts\/90\/revisions\/847"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wroberts.me\/index.php?rest_route=\/wp\/v2\/media\/515"}],"wp:attachment":[{"href":"https:\/\/wroberts.me\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=90"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wroberts.me\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=90"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wroberts.me\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=90"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/wroberts.me\/index.php?rest_route=%2Fwp%2Fv2%2Fseries&post=90"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}