{"id":506,"date":"2019-03-16T07:56:00","date_gmt":"2019-03-16T13:56:00","guid":{"rendered":"https:\/\/www.ngfamily.dynu.com\/ngwp\/?p=506"},"modified":"2024-07-28T07:07:02","modified_gmt":"2024-07-28T13:07:02","slug":"pi-hole","status":"publish","type":"post","link":"https:\/\/www.ngfamily.freeddns.org\/ngwp\/?p=506","title":{"rendered":"Pi-hole!"},"content":{"rendered":"\n<p>Since the family is out of the house, Dad thought it would be non-consequential to offload the home network&#8217;s DNS requests from the router to an independent server. This idea has been a &#8216;stuck thought&#8217; in my mind for a while as a colleague of mine, (I&#8217;m talking about you Scoot!) have been praising openDNS&#8217;s ability to censor the internet for age specific audiences.<\/p>\n\n\n\n<p>Scoot uses pi-hole in a docker container for his network which sparked the idea to do the same on one of my abandoned pine64 boards. I slapped on a minimal Ubuntu image and instead of running docker, i just installed pi-hole right on ubuntu. The commands I used are provided below<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo apt update &amp;&amp; upgrade -y\n$ sudo apt install git\n$ sudo vi \/etc\/network\/interfaces.d\/eth0\n    iface eth0 inet static\n    address x.x.x.x\n    netmask x.x.x.x\n    gateway x.x.x.x\n    dns-nameservers 208.67.222.222 208.67.220.220\n$ sudo reboot\n$ git clone --depth 1 https:\/\/github.com\/pi-hole\/pi-hole.git pi-hole\n$ cd pi-hole\/automated\\ install\/\n$ bash basic-install.sh<\/code><\/pre>\n\n\n\n<p>I just used all defaults\u2026 yes\u2019d and ok\u2019d with no regard. After it was completed, you access the admin page via<br>http:\/\/x.x.x.x\/admin<br>with the credentials provided at the end of the basic-install.sh script.<\/p>\n\n\n\n<p>I manually pointed a laptop I had around to use pi-hole and started testing sites and different services I use from the internet. Worked like a charm out of the box! Ads disappeared and depending on the web host, would either show up as a white space, or a failed to load image. That\u2019s fine with me.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"403\" src=\"https:\/\/www.ngfamily.dynu.com\/ngwp\/wp-content\/uploads\/2023\/10\/pi-holeadexample-1024x403.png\" alt=\"\" class=\"wp-image-507\" srcset=\"https:\/\/www.ngfamily.freeddns.org\/ngwp\/wp-content\/uploads\/2023\/10\/pi-holeadexample-1024x403.png 1024w, https:\/\/www.ngfamily.freeddns.org\/ngwp\/wp-content\/uploads\/2023\/10\/pi-holeadexample-300x118.png 300w, https:\/\/www.ngfamily.freeddns.org\/ngwp\/wp-content\/uploads\/2023\/10\/pi-holeadexample-768x302.png 768w, https:\/\/www.ngfamily.freeddns.org\/ngwp\/wp-content\/uploads\/2023\/10\/pi-holeadexample.png 1029w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">YouTube ads are just transparent<\/figcaption><\/figure>\n\n\n\n<p>So there was one final configuration needed to cement it as production. I changed the DHCP settings to configure the clients to purely use the pi-hole server but I still had several statically mapped host mappings that would resolve local resources. I determined it was easier to just forward those requests back to the router and maintain those specific requests at the router\/dhcp service. Code below<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo vi \/etc\/dnsmasq.d\/02-somename.conf\n    server=\/domain.com\/{router ip}\n    server=\/{router ip in in-addr arpa form}\/{router ip}\n\n\/\/Then in the \/admin console, enable Connectional Forwarding in the Advanced DNS settings.<\/code><\/pre>\n\n\n\n<p>Overall I\u2019m very pleased with pi-hole\u2026 it\u2019s blackholeing ads quite reliably and I have not seen any performance issues running it on a pine64. The cpu idles around 50 \u00b0C, RAM stays around 80MBs and I will continue to monitor its performance for the next couple weeks. However, overall, I am quite pleased and highly recommend it for your own network.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Upgrading<\/h2>\n\n\n\n<p>Couple months later, Dad noticed that there are updates available for pine-hole. Upgrading is easy.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo apt update &amp;&amp; sudo apt upgrade\n$ pihole -up --check-only\n$ pihole -up<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Since the family is out of the house, Dad thought it would be non-consequential to offload the home network&#8217;s DNS requests from the router to an independent server. This idea has been a &#8216;stuck thought&#8217; in my mind for a while as a colleague of mine, (I&#8217;m talking about you Scoot!) have been praising openDNS&#8217;s [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":508,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_eb_attr":"","footnotes":""},"categories":[34,28,19],"tags":[],"class_list":["post-506","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-homelab","category-programming","category-projects"],"_links":{"self":[{"href":"https:\/\/www.ngfamily.freeddns.org\/ngwp\/index.php?rest_route=\/wp\/v2\/posts\/506","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ngfamily.freeddns.org\/ngwp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ngfamily.freeddns.org\/ngwp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ngfamily.freeddns.org\/ngwp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ngfamily.freeddns.org\/ngwp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=506"}],"version-history":[{"count":1,"href":"https:\/\/www.ngfamily.freeddns.org\/ngwp\/index.php?rest_route=\/wp\/v2\/posts\/506\/revisions"}],"predecessor-version":[{"id":509,"href":"https:\/\/www.ngfamily.freeddns.org\/ngwp\/index.php?rest_route=\/wp\/v2\/posts\/506\/revisions\/509"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ngfamily.freeddns.org\/ngwp\/index.php?rest_route=\/wp\/v2\/media\/508"}],"wp:attachment":[{"href":"https:\/\/www.ngfamily.freeddns.org\/ngwp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=506"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ngfamily.freeddns.org\/ngwp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=506"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ngfamily.freeddns.org\/ngwp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=506"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}