{"id":11242,"date":"2015-10-17T21:28:44","date_gmt":"2015-10-18T01:28:44","guid":{"rendered":"https:\/\/www.windracer.net\/blog\/?p=11242"},"modified":"2023-10-20T18:01:13","modified_gmt":"2023-10-20T22:01:13","slug":"blocking-ads-with-pi-hole","status":"publish","type":"post","link":"https:\/\/www.windracer.net\/blog\/2015\/10\/blocking-ads-with-pi-hole\/","title":{"rendered":"Blocking ads with Pi-Hole"},"content":{"rendered":"<div class='__iawmlf-post-loop-links' style='display:none;' data-iawmlf-post-links='[{&quot;id&quot;:1887,&quot;href&quot;:&quot;https:\\\/\\\/pi-hole.net\\\/?v=7516fd43adaa&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20251112011725\\\/https:\\\/\\\/pi-hole.net\\\/?v=7516fd43adaa&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-10 13:13:56&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-02-20 12:42:37&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-04 07:17:00&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-14 11:29:14&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-19 09:23:44&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-03-19 09:23:44&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:1888,&quot;href&quot;:&quot;http:\\\/\\\/www.lighttpd.net&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20260131123534\\\/https:\\\/\\\/www.lighttpd.net\\\/&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-10 13:14:01&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-20 12:42:36&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-04 07:16:57&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-14 11:29:18&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-19 09:23:46&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-03-19 09:23:46&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:1889,&quot;href&quot;:&quot;http:\\\/\\\/www.thekelleys.org.uk\\\/dnsmasq\\\/doc.html&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20260131044642\\\/https:\\\/\\\/thekelleys.org.uk\\\/dnsmasq\\\/doc.html&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-10 13:14:04&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-20 12:42:31&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-04 07:16:56&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-14 11:29:15&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-19 09:23:51&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-03-19 09:23:51&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:1890,&quot;href&quot;:&quot;https:\\\/\\\/github.com\\\/pi-hole\\\/pi-hole\\\/issues\\\/35&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20251024194106\\\/https:\\\/\\\/github.com\\\/pi-hole\\\/pi-hole\\\/issues\\\/35&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-10 13:15:12&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-20 12:42:43&quot;,&quot;http_code&quot;:503},{&quot;date&quot;:&quot;2026-03-19 09:23:46&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-03-19 09:23:46&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:1891,&quot;href&quot;:&quot;https:\\\/\\\/twit.tv\\\/shows\\\/security-now\\\/episodes\\\/529?autostart=false&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20250816123918\\\/https:\\\/\\\/twit.tv\\\/shows\\\/security-now\\\/episodes\\\/529?autostart=false&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-10 13:15:15&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-20 12:42:45&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-19 09:23:45&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-03-19 09:23:45&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:716,&quot;href&quot;:&quot;https:\\\/\\\/twit.tv\\\/shows\\\/security-now&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20260206205110\\\/https:\\\/\\\/twit.tv\\\/shows\\\/security-now&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-02-10 05:42:17&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-14 12:46:15&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-17 23:13:31&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-21 06:49:02&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-24 21:26:46&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-02-27 22:31:19&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-04 09:25:54&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-08 22:19:56&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-12 07:06:50&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-15 16:22:59&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-19 09:23:45&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-22 23:39:39&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-03-28 04:36:54&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-01 00:34:06&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-04 05:04:30&quot;,&quot;http_code&quot;:206},{&quot;date&quot;:&quot;2026-04-07 15:29:14&quot;,&quot;http_code&quot;:206}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-04-07 15:29:14&quot;,&quot;http_code&quot;:206},&quot;process&quot;:&quot;done&quot;}]'><\/div>\n<p>Now that I had finished building my <a href=\"https:\/\/www.windracer.net\/blog\/2015\/09\/building-the-pidp-8\/\">PiDP-8<\/a> I needed something for the Raspberry Pi B+ in it to\u00a0<em>do\u00a0<\/em>other than just flash the blinkenlights. I can&#8217;t remember how I first heard about it, but for the past two weeks I&#8217;ve been running a DNS-based ad-blocker utility called <a href=\"https:\/\/pi-hole.net\/?v=7516fd43adaa\">Pi-Hole<\/a>.<\/p>\n<p><!--more--><\/p>\n<p>Pi-Hole requires a few basic packages, like <a href=\"http:\/\/www.lighttpd.net\/\">lighttpd<\/a> and <a href=\"http:\/\/www.thekelleys.org.uk\/dnsmasq\/doc.html\">dnsmasq<\/a>, but following the <a href=\"https:\/\/web.archive.org\/web\/20230608081655\/https:\/\/jacobsalmela.com\/2015\/06\/16\/block-millions-ads-network-wide-with-a-raspberry-pi-hole-2-0\/\">manual installation instructions<\/a> was relatively easy. At a high level, Pi-Hole turns your Raspberry Pi into a local DNS server for your network. You configured your devices (or router) to use the Pi-Hole as the primary DNS server for handling DNS lookup requests. By using a script (named gravity\/sh, continuing the black hole theme), Pi-Hole downloads several common blacklists containing the web addresses of 65k known ad-serving domains and redirects them to the Raspberry Pi. So, when a browser on your PC visits a site, which in turn tries to pull an ad from some.ad-server.net, the DNS on the Pi-Hole redirects that request to lighttpd on the Raspberry Pi and no ad is loaded. This method has a noticeable impact on the speed of loading web pages since, unlike using an ad-blocking plug-in in your browser, the ad request never actually leaves your network.<\/p>\n<p>Initially, Pi-Hole included a blacklist called <a href=\"https:\/\/github.com\/pi-hole\/pi-hole\/issues\/35\">mahakala<\/a> which made the total number of blocked domains over 1.6 million, but included a lot of <em>legitimate<\/em> domains, like xkcd.com and microsoft.com. That blacklist has since been commented out, but I haven&#8217;t really noticed a difference only blocking 65k domains. Pi-Hole does have a whitelisting facility, but it doesn&#8217;t use wildcards so you have to include each individual domain you want to allow through the DNS black hole.<\/p>\n<p>Pi-Hole includes a basic web console, which currently just shows statistics, but promises more admin-type features in the future.<\/p>\n<div id=\"attachment_11243\" style=\"width: 1801px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.windracer.net\/blog\/wp-content\/uploads\/2015\/10\/2015-10-09_8-23-12.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-11243\" data-attachment-id=\"11243\" data-permalink=\"https:\/\/www.windracer.net\/blog\/2015\/10\/blocking-ads-with-pi-hole\/2015-10-09_8-23-12\/\" data-orig-file=\"https:\/\/www.windracer.net\/blog\/wp-content\/uploads\/2015\/10\/2015-10-09_8-23-12.png\" data-orig-size=\"1791,202\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Pi-Hole console\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;Pi-Hole console&lt;\/p&gt;\n\" data-medium-file=\"https:\/\/www.windracer.net\/blog\/wp-content\/uploads\/2015\/10\/2015-10-09_8-23-12-300x34.png\" data-large-file=\"https:\/\/www.windracer.net\/blog\/wp-content\/uploads\/2015\/10\/2015-10-09_8-23-12-1024x115.png\" class=\"size-full wp-image-11243\" src=\"https:\/\/www.windracer.net\/blog\/wp-content\/uploads\/2015\/10\/2015-10-09_8-23-12.png\" alt=\"Pi-Hole console\" width=\"1791\" height=\"202\" srcset=\"https:\/\/www.windracer.net\/blog\/wp-content\/uploads\/2015\/10\/2015-10-09_8-23-12.png 1791w, https:\/\/www.windracer.net\/blog\/wp-content\/uploads\/2015\/10\/2015-10-09_8-23-12-150x17.png 150w, https:\/\/www.windracer.net\/blog\/wp-content\/uploads\/2015\/10\/2015-10-09_8-23-12-300x34.png 300w, https:\/\/www.windracer.net\/blog\/wp-content\/uploads\/2015\/10\/2015-10-09_8-23-12-1024x115.png 1024w, https:\/\/www.windracer.net\/blog\/wp-content\/uploads\/2015\/10\/2015-10-09_8-23-12-730x82.png 730w\" sizes=\"auto, (max-width: 1791px) 100vw, 1791px\" \/><\/a><p id=\"caption-attachment-11243\" class=\"wp-caption-text\">Pi-Hole console<\/p><\/div>\n<p>Coincidentally, Steve Gibson also mentioned Pi-Hole on this week&#8217;s episode (#<a href=\"https:\/\/twit.tv\/shows\/security-now\/episodes\/529?autostart=false\">529<\/a>) of the <a href=\"https:\/\/twit.tv\/shows\/security-now\">Security Now!<\/a> podcast:<\/p>\n<p><span class=\"embed-youtube\" style=\"text-align:center; display: block;\"><iframe loading=\"lazy\" class=\"youtube-player\" width=\"730\" height=\"411\" src=\"https:\/\/www.youtube.com\/embed\/p7-osq_y8i8?version=3&#038;rel=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=en-US&#038;autohide=2&#038;start=6026&#038;wmode=transparent\" allowfullscreen=\"true\" style=\"border:0;\" sandbox=\"allow-scripts allow-same-origin allow-popups allow-presentation allow-popups-to-escape-sandbox\"><\/iframe><\/span><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Now that I had finished building my PiDP-8 I needed something for the Raspberry Pi B+ in it to\u00a0do\u00a0other than just flash the blinkenlights. I can&#8217;t remember how I first heard about it, but for the past two weeks I&#8217;ve been running a DNS-based ad-blocker utility called Pi-Hole.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[100,15],"tags":[86,92,67],"class_list":["post-11242","post","type-post","status-publish","format-standard","hentry","category-hardware","category-software","tag-internet","tag-raspi","tag-security"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.windracer.net\/blog\/wp-json\/wp\/v2\/posts\/11242","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.windracer.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.windracer.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.windracer.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.windracer.net\/blog\/wp-json\/wp\/v2\/comments?post=11242"}],"version-history":[{"count":0,"href":"https:\/\/www.windracer.net\/blog\/wp-json\/wp\/v2\/posts\/11242\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.windracer.net\/blog\/wp-json\/wp\/v2\/media?parent=11242"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.windracer.net\/blog\/wp-json\/wp\/v2\/categories?post=11242"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.windracer.net\/blog\/wp-json\/wp\/v2\/tags?post=11242"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}