<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Tyler</title>
    <description>The latest articles on DEV Community by Tyler (@nullangst).</description>
    <link>https://dev.to/nullangst</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F484813%2Fd0485bdf-2e3f-4b1f-9e82-4ae7ac2e0263.png</url>
      <title>DEV Community: Tyler</title>
      <link>https://dev.to/nullangst</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nullangst"/>
    <language>en</language>
    <item>
      <title>Pihole or AdGuard Home as DHCP server with UFW enabled.</title>
      <dc:creator>Tyler</dc:creator>
      <pubDate>Tue, 08 Mar 2022 21:06:00 +0000</pubDate>
      <link>https://dev.to/nullangst/pihole-or-adguard-home-as-dhcp-server-with-ufw-enabled-36lb</link>
      <guid>https://dev.to/nullangst/pihole-or-adguard-home-as-dhcp-server-with-ufw-enabled-36lb</guid>
      <description>&lt;p&gt;In order to do this you need a couple of things first.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;UFW installed.&lt;/li&gt;
&lt;li&gt;UFW disabled.&lt;/li&gt;
&lt;li&gt;Pihole or AdGuard Home installed.&lt;/li&gt;
&lt;li&gt;Pihole or AdGuard Home set on a static IP configured on the machine itself.&lt;/li&gt;
&lt;li&gt;Pihole or AdGuard Home set to lease DHCP.&lt;/li&gt;
&lt;li&gt;Know your DHCP pool.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your DHCP pool is essentially your router IP with a 0 replacing the last digit. So it could be &lt;code&gt;192.168.1.0&lt;/code&gt; or &lt;code&gt;192.168.254.0&lt;/code&gt; in my case it is &lt;code&gt;10.0.0.0&lt;/code&gt; once you have this, we can setup UFW. If you SSH into your Pi-hole or AdGuard Home hosting device remotely this will block that connection, so you will have to manually specify allow incoming on the port you have SSH on, and I beg you to move it off of port 22. Follow along below.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ufw disable&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ufw default deny incoming&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ufw default allow outgoing&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ufw allow from any port 68 to any port 67 proto udp&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These next two commands will vary depending on your local setup. For me my Ethernet connection is viewed as &lt;code&gt;etho1&lt;/code&gt; on my AdGuard Home machine. However yours could be &lt;code&gt;eth1&lt;/code&gt; or &lt;code&gt;enspo0&lt;/code&gt; you will have to determine this yourself, it will also vary if you're using a wireless connection.&lt;/p&gt;

&lt;p&gt;Run &lt;code&gt;ip a&lt;/code&gt; to find the name of your connection, &lt;code&gt;lo&lt;/code&gt; is loopback and not the one to use, I will use my &lt;code&gt;etho1&lt;/code&gt; for the commands below. Also, I will use &lt;code&gt;192.168.1.0&lt;/code&gt; for the example command, you will have to change those numbers to match your config.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;ufw allow in to 192.168.1.0/24&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ufw allow in on etho1 from any port 68 to any port 67 proto udp&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ufw reload&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;ufw enable&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now &lt;code&gt;ufw&lt;/code&gt; is running, allowing Pihole or AdGuard Home to correctly lease DHCP, blocking external connection attempts to this device, allowing local devices to utilize it, and everything is working as it should be.&lt;/p&gt;

&lt;p&gt;AdGuard &amp;amp; Pi-hole Discord: &lt;a href="https://discord.gg/VzThBmB" rel="noopener noreferrer"&gt;https://discord.gg/VzThBmB&lt;/a&gt;&lt;/p&gt;

</description>
      <category>pihole</category>
      <category>dhcp</category>
      <category>ufw</category>
      <category>firewall</category>
    </item>
    <item>
      <title>Using DNSCrypt with AdGuard Home &amp; Pi-hole</title>
      <dc:creator>Tyler</dc:creator>
      <pubDate>Tue, 06 Jul 2021 19:35:24 +0000</pubDate>
      <link>https://dev.to/nullangst/using-dnscrypt-with-adguard-home-pi-hole-7j6</link>
      <guid>https://dev.to/nullangst/using-dnscrypt-with-adguard-home-pi-hole-7j6</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffv7qos4uwf4r7m2f9qvp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffv7qos4uwf4r7m2f9qvp.png" alt="Alt Text" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This will be a super simple and easy to follow guide to get you using DNSCrypt and utilize DNSSEC with AdGuard Home and/or Pi-hole on Linux.&lt;/p&gt;

&lt;p&gt;1: Open your terminal of choice or ssh into the machine&lt;/p&gt;

&lt;p&gt;2: run &lt;code&gt;sudo su&lt;/code&gt; to become superuser&lt;/p&gt;

&lt;p&gt;3: run &lt;code&gt;cd /opt&lt;/code&gt; since this is where we install DNSCrypt&lt;/p&gt;

&lt;p&gt;4: You need to download the latest binaries from &lt;a href="https://github.com/DNSCrypt/dnscrypt-proxy/releases" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; with &lt;code&gt;wget&lt;/code&gt; in this example we will use the 64bit version (since that is most common)&lt;/p&gt;

&lt;p&gt;4.5: THIS ISN'T THE LINK YOU USE, use the latest release that is for your system &lt;code&gt;wget&lt;/code&gt; is the correct tool for the job, this is how you download the file &lt;code&gt;wget https://github.com/DNSCrypt/dnscrypt-proxy/releases/download/2.0.46-beta3/dnscrypt-proxy-linux_x86_64-2.0.46-beta3.tar.gz&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;5: run &lt;code&gt;tar xzvf dnscrypt-proxy-linux_x86_64=2.0.46-beta3.tar.gz&lt;/code&gt; or whichever you have to download for your system&lt;/p&gt;

&lt;p&gt;6: run &lt;code&gt;mv linux-x86_64 dnscrypt-proxy&lt;/code&gt; or whichever is for your system, could be &lt;code&gt;linuxi386&lt;/code&gt; or whatever you downloaded for your system.&lt;/p&gt;

&lt;p&gt;7: Delete the tar file with &lt;code&gt;rm dnscrypt-proxy-linux_x86_64=2.0.46-beta3.tar.gz&lt;/code&gt; or whichever file you have downloaded.&lt;/p&gt;

&lt;p&gt;8: &lt;code&gt;cd&lt;/code&gt; into the new directory with &lt;code&gt;cd dnscrypt-proxy&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;9: use &lt;code&gt;mv&lt;/code&gt; to rename the example to the config file we are going to use. &lt;code&gt;mv example-dnscrypt-proxy.toml dnscrypt-proxy.toml&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;9.5: Now we are going to edit the newly created &lt;code&gt;.toml&lt;/code&gt; file with our editor of choice, in this example I will use Vim but you can use nano, emacs, etc.&lt;/p&gt;

&lt;p&gt;run &lt;code&gt;vim dnscrypt-proxy.toml&lt;/code&gt; to begin editing the config file. This is a long file and mostly complete I will guide you through the lines you have to change.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;listen_addresses = ['127.0.0.1:53']&lt;/code&gt; needs to be changed to &lt;code&gt;listen_addresses = ['127.0.0.1:5335']&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;require_dnssec = false&lt;/code&gt; should be &lt;code&gt;require_dnssec = true&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;10: From here you are ready to continue with setup, but this is a huge config file with lots of options, you can tinker as you see fit.&lt;/p&gt;

&lt;p&gt;11: run &lt;code&gt;./dnscrypt-proxy -service install&lt;/code&gt; and &lt;code&gt;./dnscrypt-proxy -service start&lt;/code&gt; and &lt;code&gt;systemctl enable dnscrypt-proxy&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Now login to the admin portal of either Pi-hole or AdGuard Home, whichever you are using.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Telling AdGuard Home to use DNSCrypt&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Go into your AdGuard Home admin panel and go to Settings -&amp;gt; DNS settings&lt;/p&gt;

&lt;p&gt;In the Upstream DNS servers box you now put 127.0.0.1:5335 and apply.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Telling Pi-hole to use DNSCrypt&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go into Settings and go to Upstream DNS settings, uncheck every DNS box and check one custom IPv4 address, input &lt;code&gt;127.0.0.1#5335&lt;/code&gt; and apply&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Finalize Configuration&lt;/strong&gt;&lt;br&gt;
Make sure to enable DNSSEC in whichever software you are using with DNSCrypt.&lt;/p&gt;

&lt;p&gt;If you have any issues or want to join a community of whole home adblocking/tech enthusiasts please check out: &lt;a href="https://discord.gg/DGscCVPRme" rel="noopener noreferrer"&gt;https://discord.gg/DGscCVPRme&lt;/a&gt;&lt;/p&gt;

</description>
      <category>adblock</category>
      <category>dnscrypt</category>
      <category>adguard</category>
      <category>adguardhome</category>
    </item>
    <item>
      <title>How to use Unbound with AdGuard Home or Pi-hole</title>
      <dc:creator>Tyler</dc:creator>
      <pubDate>Mon, 16 Nov 2020 03:21:00 +0000</pubDate>
      <link>https://dev.to/nullangst/how-to-use-unbound-with-adguard-home-1o5n</link>
      <guid>https://dev.to/nullangst/how-to-use-unbound-with-adguard-home-1o5n</guid>
      <description>&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Install unbound with your package manager. I use &lt;code&gt;apt&lt;/code&gt; so in my case I &lt;code&gt;sudo apt install unbound&lt;/code&gt; and it is installed, it depends on your system which package manager you have.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create and edit &lt;code&gt;/etc/unbound/unbound.conf.d/config.conf&lt;/code&gt;&lt;br&gt;
I use &lt;code&gt;vim&lt;/code&gt; but you can use whichever text editor you prefer. In my case I do &lt;code&gt;sudo vim /etc/unbound/unbound.conf.d/config.conf&lt;/code&gt; &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Once you are in your terminal and ready to input into the config file, insert the following. Only enable IPv6 if it is native to your network, 6to4 tunneling is not native IPv6. Also you need to set &lt;code&gt;num-threads:&lt;/code&gt;to the number of threads for your machine! default is one, in my config I have 4.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;server:
  interface: 127.0.0.1
  port: 5335
  do-ip6: no
  do-ip4: yes
  do-udp: yes
  do-tcp: yes
  # Set number of threads to use
  num-threads: 4
  # Hide DNS Server info
  hide-identity: yes
  hide-version: yes
  # Limit DNS Fraud and use DNSSEC
  harden-glue: yes
  harden-dnssec-stripped: yes
  harden-referral-path: yes
  use-caps-for-id: yes
  harden-algo-downgrade: no
  qname-minimisation: yes
  aggressive-nsec: yes
  rrset-roundrobin: yes

  # If DNSSEC isnt working uncomment the following line
  # auto-trust-anchor-file: "/var/lib/unbound/root.key"


  # Minimum lifetime of cache entries in seconds
  cache-min-ttl: 300
  # Configure TTL of Cache
  cache-max-ttl: 14400
  # Optimizations
  msg-cache-slabs: 8
  rrset-cache-slabs: 8
  infra-cache-slabs: 8
  key-cache-slabs: 8
  serve-expired: yes
  serve-expired-ttl: 3600
  edns-buffer-size: 1232
  prefetch: yes
  prefetch-key: yes
  target-fetch-policy: "3 2 1 1 1"
  unwanted-reply-threshold: 10000000
  # Set cache size
  rrset-cache-size: 256m
  msg-cache-size: 128m
  # increase buffer size so that no messages are lost in traffic spikes
  so-rcvbuf: 1m
  private-address: 192.168.0.0/16
  private-address: 169.254.0.0/16
  private-address: 172.16.0.0/12
  private-address: 10.0.0.0/8
  private-address: fd00::/8
  private-address: fe80::/10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Restart unbound with &lt;code&gt;sudo systemctl restart unbound&lt;/code&gt; it is now listening on the specified port and doing what the config says.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Telling AdGuard Home to use Unbound&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Go into your AdGuard Home admin panel and go to Settings -&amp;gt; DNS settings&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In the Upstream DNS servers box you now put &lt;code&gt;127.0.0.1:5335&lt;/code&gt; and apply. &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Telling Pi-hole to use Unbound&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go into Settings and Upstream DNS settings, uncheck every DNS box and check one custom IPv4 address, input &lt;code&gt;127.0.0.1#5335&lt;/code&gt; and apply&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Finalize Configuration&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You should enable DNSSEC in Pi-hole or AdGuard Home, whichever you're using. This way you can see in the query log the DNSSEC replies you're getting on resolved domains. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;AdGuard &amp;amp; Pi-hole Discord: &lt;a href="https://discord.gg/DGscCVPRme" rel="noopener noreferrer"&gt;https://discord.gg/DGscCVPRme&lt;/a&gt;&lt;/p&gt;

</description>
      <category>adguard</category>
      <category>pihole</category>
      <category>unbound</category>
      <category>dns</category>
    </item>
    <item>
      <title>How to use Unbound with AdGuard Home</title>
      <dc:creator>Tyler</dc:creator>
      <pubDate>Fri, 13 Nov 2020 19:04:24 +0000</pubDate>
      <link>https://dev.to/nullangst/how-to-use-unbound-with-adguard-home-2i6i</link>
      <guid>https://dev.to/nullangst/how-to-use-unbound-with-adguard-home-2i6i</guid>
      <description>&lt;p&gt;I made a more updated version, can't figure out how to remove this post from dev.to but here is the link &lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.to/cipherops/how-to-use-unbound-with-adguard-home-1o5n"&gt;https://dev.to/cipherops/how-to-use-unbound-with-adguard-home-1o5n&lt;/a&gt;&lt;/p&gt;

</description>
      <category>networking</category>
      <category>adblock</category>
      <category>adguard</category>
      <category>unbound</category>
    </item>
  </channel>
</rss>
