The OpenDNS service is great — it provides anti-phishing and the ability to filter out some of the less desirable detritus from the internets.

OpenDNS needs to be periodically notified about what your IP address is, and I don’t have a windows or macintosh box that’s always on. I do have an ubuntu box, though, but there weren’t any instructions on OpenDNS’ site to do this properly.

Cron does periodic jobs very well — but rather than using “crontab -e”, it’s much better to install a system-level cron job by adding a file to the /etc/cron.d directory. The file only needs to be readable — there’s no need to set the execute bit. You can choose the effective user that will run the command (in this case I ran as “nobody”), and a backup of your system that includes /etc will pick up your crontab entry.

Here’s the contents of /etc/cron.d/opendns:

47 * * * * nobody curl -u USERNAME:PASSWORD -s https://updates.opendns.com/nic/update | grep -vE "^good"

Replace USERNAME and PASSWORD with your opendns username and password.

The grep squelches success messages. No news is good news.

Related posts:

  1. Installing Trac on Ubuntu
    Here’s the condensed version, using the installation guide for help: Install the software sudo apt-get install python-setuptools python-subversion sudo easy_install Trac Initialize the Trac project We’re going to run the......
  2. How to bounce an application with Applescript
    Say, for whatever reason, you want to bounce iphoto once an hour. You can do that with AppleScript and cron. Copy this into ~/bin/bounce-iphoto: #!/usr/bin/osascript on appIsRunning(appName) tell application "System......
  3. Verifying file integrity with debsums
    After upgrading my Ubuntu server, some security applications grumped about changed contents of some common binaries. Just to be safe, I wanted to verify them explicitly with debsums, but debsums......
  4. Installing CrashPlan on Ubuntu 9.04 Server Edition
    Although rsnapshot is super for linux-to-linux backups, I’ve found CrashPlan to work very well as a backup solution for my family’s windows and mac boxes. The CrashPlan installation works pretty......