John Piasetzki's Blog

My Thoughts

Dnsmasq on OpenBSD 5.1

One of the packages that broke when I was updating to 5.1 was dnsmasq. The dnsmasq package doesn’t appear to yet be set up to work with the new rc.d. There is a port that is however I prefer to work with packages so here are the steps to get the package working.

First navigate to the rc.d directory and download the start script:

1
cd /etc/rc.d && ftp ftp://ftp.openbsd.org/ports/net/dnsmasq/pkg/dnsmasq.rc

Open the file and change line 5 to read:

/etc/rc.d/dnsmasqd
1
daemon="/usr/local/sbin/dnsmasq"

At this point test starting the service by running:

/etc/rc.d/dnsmasqd
1
/etc/rc.d/dnsmasqd start

If it say it starts in rc.conf.local add:

/etc/rc.conf.local
1
pkg_scripts="dnsmasqd"

And you should have a speedy dns server setup!