253 lines
10 KiB
HTML
253 lines
10 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en-us">
|
||
<head><script src="/livereload.js?mindelay=10&v=2&port=1313&path=livereload" data-no-instant defer></script>
|
||
<meta charset="utf-8">
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||
|
||
<title>My New Hugo Site</title>
|
||
<meta name="viewport" content="width=device-width,minimum-scale=1">
|
||
<meta name="description" content="Pi-hole DNS server
|
||
DNS server that supports DNS-based domain blocking.
|
||
Host: 192.168.1.105 (raspberrypi)
|
||
Port: 53
|
||
Upstream DNS server: 192.168.0.1 (i.e. ISP DNS)
|
||
Admin interface
|
||
URL using IP address: http://192.168.0.105:8080/admin/
|
||
URL using domain: http://pi.hole/admin/ (Request is routed through reverse proxy
|
||
running on raspberrypi.)
|
||
Local DNS
|
||
Local network domains use .home instead of .local because .local collides
|
||
with device’s built-in systems for resolving .local domains automagically.
|
||
A records
|
||
.home A records map machine domain names to their IP address.">
|
||
<meta name="generator" content="Hugo 0.145.0">
|
||
|
||
|
||
|
||
<meta name="robots" content="noindex, nofollow">
|
||
|
||
|
||
|
||
|
||
<link rel="stylesheet" href="/ananke/css/main.min.css" >
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<link rel="canonical" href="http://localhost:1313/home-network/services/pi-hole-dns-server/">
|
||
|
||
|
||
<meta property="og:url" content="http://localhost:1313/home-network/services/pi-hole-dns-server/">
|
||
<meta property="og:site_name" content="My New Hugo Site">
|
||
<meta property="og:title" content="My New Hugo Site">
|
||
<meta property="og:description" content="Pi-hole DNS server DNS server that supports DNS-based domain blocking. Host: 192.168.1.105 (raspberrypi)
|
||
Port: 53
|
||
Upstream DNS server: 192.168.0.1 (i.e. ISP DNS)
|
||
Admin interface URL using IP address: http://192.168.0.105:8080/admin/
|
||
URL using domain: http://pi.hole/admin/ (Request is routed through reverse proxy running on raspberrypi.)
|
||
Local DNS Local network domains use .home instead of .local because .local collides with device’s built-in systems for resolving .local domains automagically.
|
||
A records .home A records map machine domain names to their IP address.">
|
||
<meta property="og:locale" content="en_us">
|
||
<meta property="og:type" content="article">
|
||
<meta property="article:section" content="home-network">
|
||
|
||
<meta itemprop="name" content="My New Hugo Site">
|
||
<meta itemprop="description" content="Pi-hole DNS server DNS server that supports DNS-based domain blocking. Host: 192.168.1.105 (raspberrypi)
|
||
Port: 53
|
||
Upstream DNS server: 192.168.0.1 (i.e. ISP DNS)
|
||
Admin interface URL using IP address: http://192.168.0.105:8080/admin/
|
||
URL using domain: http://pi.hole/admin/ (Request is routed through reverse proxy running on raspberrypi.)
|
||
Local DNS Local network domains use .home instead of .local because .local collides with device’s built-in systems for resolving .local domains automagically.
|
||
A records .home A records map machine domain names to their IP address.">
|
||
<meta itemprop="wordCount" content="246">
|
||
<meta name="twitter:card" content="summary">
|
||
<meta name="twitter:title" content="My New Hugo Site">
|
||
<meta name="twitter:description" content="Pi-hole DNS server DNS server that supports DNS-based domain blocking. Host: 192.168.1.105 (raspberrypi)
|
||
Port: 53
|
||
Upstream DNS server: 192.168.0.1 (i.e. ISP DNS)
|
||
Admin interface URL using IP address: http://192.168.0.105:8080/admin/
|
||
URL using domain: http://pi.hole/admin/ (Request is routed through reverse proxy running on raspberrypi.)
|
||
Local DNS Local network domains use .home instead of .local because .local collides with device’s built-in systems for resolving .local domains automagically.
|
||
A records .home A records map machine domain names to their IP address.">
|
||
|
||
|
||
</head><body class="ma0 avenir bg-near-white development">
|
||
|
||
|
||
|
||
|
||
|
||
<header>
|
||
<div class="bg-black">
|
||
<nav class="pv3 ph3 ph4-ns" role="navigation">
|
||
<div class="flex-l justify-between items-center center">
|
||
<a href="/" class="f3 fw2 hover-white no-underline white-90 dib">
|
||
|
||
My New Hugo Site
|
||
|
||
</a>
|
||
<div class="flex-l items-center">
|
||
|
||
|
||
|
||
<div class="ananke-socials"></div>
|
||
|
||
</div>
|
||
</div>
|
||
</nav>
|
||
|
||
</div>
|
||
</header>
|
||
|
||
|
||
|
||
<main class="pb7" role="main">
|
||
|
||
|
||
|
||
<article class="flex-l flex-wrap justify-between mw8 center ph3">
|
||
<header class="mt4 w-100">
|
||
<aside class="instapaper_ignoref b helvetica tracked ttu">
|
||
|
||
Home-Networks
|
||
</aside><div id="sharing" class="mt3 ananke-socials"></div>
|
||
<h1 class="f1 athelas mt3 mb1"></h1>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</header>
|
||
<div class="nested-copy-line-height lh-copy serif f4 nested-links mid-gray pr4-l w-two-thirds-l"><h1 id="pi-hole-dns-server">Pi-hole DNS server</h1>
|
||
<h2 id="dns-server-that-supports-dns-based-domain-blocking">DNS server that supports DNS-based domain blocking.</h2>
|
||
<p>Host: 192.168.1.105 (raspberrypi)</p>
|
||
<p>Port: 53</p>
|
||
<p>Upstream DNS server: 192.168.0.1 (i.e. ISP DNS)</p>
|
||
<h2 id="admin-interface">Admin interface</h2>
|
||
<p>URL using IP address: http://192.168.0.105:8080/admin/</p>
|
||
<p>URL using domain: <a href="http://pi.hole/admin/">http://pi.hole/admin/</a> (Request is routed through reverse proxy
|
||
running on raspberrypi.)</p>
|
||
<h2 id="local-dns">Local DNS</h2>
|
||
<p>Local network domains use <code>.home</code> instead of <code>.local</code> because <code>.local</code> collides
|
||
with device’s built-in systems for resolving <code>.local</code> domains automagically.</p>
|
||
<h3 id="a-records">A records</h3>
|
||
<p><code>.home</code> A records map machine domain names to their IP address.</p>
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th style="text-align: left">Domain</th>
|
||
<th style="text-align: left">IP Address</th>
|
||
<th style="text-align: left">Comment</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td style="text-align: left">raspberrypi.home</td>
|
||
<td style="text-align: left">192.168.0.105</td>
|
||
<td style="text-align: left">raspberrypi</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="text-align: left">homeoffice.home</td>
|
||
<td style="text-align: left">192.168.0.108</td>
|
||
<td style="text-align: left">homeoffice</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<h3 id="cname-records">CNAME records</h3>
|
||
<p><code>.home</code> CNAME records map service domain names to their machine’s domain name.</p>
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th style="text-align: left">Domain</th>
|
||
<th style="text-align: left">Target</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td style="text-align: left">jellyfin.home</td>
|
||
<td style="text-align: left">raspberrypi.local</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="text-align: left">notes.home</td>
|
||
<td style="text-align: left">raspberrypi.local</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<h2 id="groups">Groups</h2>
|
||
<p>Default</p>
|
||
<ul>
|
||
<li>Adlist: <a href="https://github.com/StevenBlack/hosts">https://github.com/StevenBlack/hosts</a></li>
|
||
</ul>
|
||
<p>Emma</p>
|
||
<ul>
|
||
<li>Emma’s phone.</li>
|
||
<li>No adlist?</li>
|
||
<li>Whitelisted Google ad services anyway.</li>
|
||
</ul>
|
||
<h2 id="debugging-dns-from-homeoffice">Debugging DNS (from homeoffice)</h2>
|
||
<h3 id="server-health-check">Server health check</h3>
|
||
<p>Check Pi-hole’s status:</p>
|
||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>ssh raspberrypi
|
||
</span></span><span style="display:flex;"><span>pihole status
|
||
</span></span></code></pre></div><h3 id="client-health-check">Client health check</h3>
|
||
<p>Confirm that the network interface controller is using the expected DNS server:</p>
|
||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span><span style="color:#75715e"># List interfaces to find ethernet or wi-fi controller.</span>
|
||
</span></span><span style="display:flex;"><span>nmcli | grep <span style="color:#e6db74">": connected to"</span>
|
||
</span></span><span style="display:flex;"><span>
|
||
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Show the DNS servers used by the controller.</span>
|
||
</span></span><span style="display:flex;"><span>nmcli device show <interface> | grep DNS
|
||
</span></span></code></pre></div><p>Restart the name resolution service:</p>
|
||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo systemctl restart systemd-resolved
|
||
</span></span></code></pre></div><h2 id="how-linux-machines-choose-a-dns-server">How Linux machines choose a DNS server</h2>
|
||
<h3 id="when-using-dhcp">When using DHCP</h3>
|
||
<p>DNS servers are determined by <code>/etc/dhcpcd.conf</code>:</p>
|
||
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span><span style="color:#75715e"># Get the DNS servers list from the DHCP server, which is usually on the router.</span>
|
||
</span></span><span style="display:flex;"><span>option domain_name_servers
|
||
</span></span><span style="display:flex;"><span>
|
||
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Or, set a list of DNS servers explicitly.</span>
|
||
</span></span><span style="display:flex;"><span><span style="color:#75715e"># e.g.</span>
|
||
</span></span><span style="display:flex;"><span><span style="color:#75715e"># - 1.1.1.1 Cloudflare</span>
|
||
</span></span><span style="display:flex;"><span><span style="color:#75715e"># - 192.168.0.1 LAN Router</span>
|
||
</span></span><span style="display:flex;"><span>static domain_name_servers<span style="color:#f92672">=</span>1.1.1.1,192.168.0.1
|
||
</span></span></code></pre></div><ul class="pa0">
|
||
|
||
</ul>
|
||
<div class="mt6 instapaper_ignoref">
|
||
|
||
|
||
</div>
|
||
</div>
|
||
|
||
<aside class="w-30-l mt6-l">
|
||
|
||
|
||
|
||
|
||
</aside>
|
||
|
||
</article>
|
||
|
||
</main>
|
||
<footer class="bg-black bottom-0 w-100 pa3" role="contentinfo">
|
||
<div class="flex justify-between">
|
||
<a class="f4 fw4 hover-white no-underline white-70 dn dib-ns pv2 ph3" href="http://localhost:1313/" >
|
||
© My New Hugo Site 2025
|
||
</a>
|
||
<div><div class="ananke-socials"></div>
|
||
</div>
|
||
</div>
|
||
</footer>
|
||
|
||
</body>
|
||
</html>
|