Dynamic DNS - auto-updating from macOS

To run a little project (that I’ll describe at some point in the future) I have to run a small web server from my home computer, one that happens to run macOS. More than anything else, this is just a reply of what I did to get it running in case: a) I have to do it again, or b) Someone else can find it useful.

Sign up for dynamic DNS service

I signed up for service with dynv6 because I saw it recommended elsewhere and it didn’t look creepy like some of the other options. I just signed up with email - through an email proxy anonymizer, because I’m paranoid. After verifying my email, I was able to create a new “zone”, basically a record of my public IP address linked to custom DNS.

Updating the IP address.

Most of us don’t have static public IP addresses, so some mechanism is required to keep the custom DNS and your public IP address linked.

I used the ddclient tool Github to keep my dynamic DNS up-to-date. The Homebrew install works well:

brew install ddclient

Now we need to configure the ddclient tool with a ddclient.conf file. This is a little struggle because the syntax offered when you create a zone on dynv6 is not correct. Here is the syntax that works:

# ddclient configuration for dyndns
#
# /usr/local/etc/ddclient/ddclient.conf
syslog=yes
ssl=yes
use=web, web=checkip.dyndns.com/, web-skip='Current IP Address'
server=dynv6.com
protocol=dyndns2
login=none
password='YOUR PASSWORD'
YOUR_ZONE

YOUR_PASSWORD is the password key that you obtain from dynv6. YOUR_ZONE is the full zone name.

To check that the updater is working:

sudo /usr/local/opt/ddclient/sbin/ddclient -verbose -noquiet

If that succeeds, then you can set it up on a schedule:

sudo cp -fv /usr/local/opt/ddclient/*.plist /Library/LaunchDaemons
sudo chown root /Library/LaunchDaemons/homebrew.mxcl.ddclient.plist

sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.ddclient.plist

No sir, I do not want Big Sur

Maybe I’m just getting cranky after over a year of on-again-off-again pandemic lockdowns, but I’ve had it with Apple’s heavy-handed attempts to get me to upgrade to Big Sur. Mind you, I have nothing against it. It’s just an operating system. I don’t particularly like it’s translucent bubbly iOS look. But I could live with.

But I don’t want it. I depend on a very unorthodox setup. I have a lot of infrastructure tools that depend on certain versions of Python to be in just the right place. Every single macOS major upgrade breaks all of this and I spend days picking up the pieces. I’m tired of Apple messing with it. So when my system launched into what seems like an unbidden upgrade process today, I lost it.

I’m not exactly sure how the upgrade got triggered today. In my frustration I may have hit the wrong button or was otherwise too hasty. But what follows is the documentation of my quest to never face this again.

First, in System Preferences → Software Update, uncheck “Automatically keep my Mac up to date”. I already had this checked; so digging deeper there is an “Advanced…” button to deal with. Uncheck everything in the Advanced pane.

Next up, Terminal. In Terminal (or my preference, iTerm)

softwareupdate --ignore "macOS Big Sur"

which should report:

Ignored updates:
(
)

Software Update can only ignore updates that are eligible for installation.
If the label provided to ignore is not in the above list, it is not eligible
to be ignored.

Ignoring software updates is deprecated.
The ability to ignore individual updates will be removed in a future release of macOS.

There is a nuclear option known as bigsurblocker that apparently does what it says on the tin. I’m holding that one in reserve but it can be downloaded from Github if needed.