January 20, 2021

NextDNS Setup

The other day, Andrew mentioned NextDNS and it sounded pretty cool. I liked the idea of pi-hole, but didn’t want another service to manage on my home server. NextDNS is pretty easy to setup and get going, but there is one hang up for people who do not have a static IP from their ISP. Below is a pretty simple way to automate updating your ISP IP with NextDNS to keep the service running smoothly.

High level overview of getting it all going the way I did.

  1. Change the DNS entries in your router, generally in your router settings
  2. Check your devices to ensure they are not setup to use other custom DNS entries from other services you may have tried in the past.
  3. If you have a static IP from your ISP, you are done. Mine is not technically static, but has yet to change since starting the service. Just in case it ever does I am using the following to update NextDNS with my current ISP IP address.

Create a new simple .sh script to simply run the url provided by NextDNS to update them with my current ISP IP.

Shell Script (nextdns_ip_update.sh)

curl https://link-ip.nextdns.io/XXXXXX/YYYYYYYYYYYYYYYY

XXXXXX = Endpoint ID from NextDNS Dashboard
YYYYYYYYYYYYYYYY = Random String from NextDNS Dashboard

Launch Agent (update_nextdns_ip.plist)
A simple .plist that is placed in /Library/LaunchAgents set to run the .sh every 3 hours. (3 hours might be a bit aggressive?) There is also a .log file in case anything goes wrong.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plist version="1.0">
        <string>nextdns ip updater</string>

DNS Networking Ad Blocking NextDNS Pi-Hole

Previous post
2020 Results! On To 2021! Looking back at the post from January 2020, you can see the extended explanation of each item that I wanted to accomplish in 2020. I think we all
Next post
A New Board Game: {macro}Dungeon You may have been following along with this journey, or perhaps this is the first you are hearing about it, either way, it has arrived for the world
Jason Burk | 1999-2022
blot.im! | 🧛‍♂️
📦 Blog Archives 📦