Skip to content
Tech News
← Back to articles

My home network observes bedtime with OpenBSD and pf

read original get OpenBSD pf Firewall Book → more articles
Why This Matters

This article highlights how using OpenBSD and pf, combined with a simple scripting approach, can enhance home network management and backup strategies. It demonstrates the importance of automating configuration backups to ensure system stability and ease of recovery, which is valuable for both tech enthusiasts and professionals. Such practices promote more reliable, secure, and manageable home networks in an increasingly connected world.

Key Takeaways

One thing I’ve often strugged with for projects like this is how to back up all of my carefully crafted settings when they’re scattered all over the filesystem.

The answer I came up with is also in the repo, a short ksh script called update-repo.sh.

It’s mostly a series of cp statements to copy the related files from their various locations to the repo (and a chmod and chown make them accessible to my regular user account). It also dumps the current crontab.

After making changes, I cd to the Git repo in my home directory and run this script. Then commit the changes and push them to my home server (also now running OpenBSD - article pending!). Since the repos on my home server are fully backed up, my configuration is backed up well. Nice!

In addition to its basic function, the update-repo.sh script serves as a handy index for which files are involved and where they go. If I had to, I could use it to reverse the process and populate the computer configuration from the repo.