Speeding Up Your Net Browsing with PDNSD Domain Name Caching on Mac OS X / Debian

DNS is the Domain Name System. DNS converts machine names to the IP addresses that all machines on the net have. Every time you type google.com your computer has to ask for an IP address from a DNS server. (Looking for... Step in your browser when connecting to a site.) We can cache the return value for the request to speed up subsequent request.

pdnsd is a proxy dns server with permanent caching, unlike other DNS servers pdnsd writes the cache to hard disk on exit.

If you don't have MacPorts installed, install it first. MacPorts has a port of pdnsd. You can use,

sudo port install pdnsd

to get it to install pdnsd.

Create a file named, pdnsd.conf under /opt/local/etc/pdnsd/ with the following content.

include conf from base

Change the owner of the file to root,

sudo chown root /opt/local/etc/pdnsd/pdnsd.conf

Make directory called /var/pdnsd/ and set the owner as nobody,

sudo mkdir /var/pdnsd/
sudo chown nobody /var/pdnsd/

Next, we need to create a start up item for OS X,

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <string>pdnsd - a proxy DNS server with permanent caching</string>

Save it as, pdnsd.plist under the folder,


We need to set the owner as root and give it a permission of 644,

sudo chown root /Library/LaunchDaemons/pdnsd.plist 
chmod 644 /Library/LaunchDaemons/pdnsd.plist 

In order to launch it you can use,

sudo launchctl load /Library/LaunchDaemons/pdnsd.plist

To test, issue

dig @ google.com

If you a get a response back everything is working, if you don't get a response back check,


for errors. Make sure all the files are owned by root and has correct permissions.

Debian setup add to,


a new entry,


rebuild resolve.conf

resolvconf -u