Setting Up DNSCrypt By OpenDNS On An Ubuntu 13.04 System
So I’ve just spent the time getting DNSCrypt working on my system. It was a bit of a pain but now that I got it done it shouldn’t be hard to recreate. I thought I’d write up a short guide explaining how to get it done.
Note that all double “-“s are turned into single ones. This is a WordPress issue. You’ll have to manually type them in, sorry.
Step 1: Setting Up A DNSCrypt User
sudo adduser --system --quiet --home /run/dnscrypt --shell /bin/false --group --disabled-password --disabled-login dnscrypt
That’s all one command. This is so that DNSCrypt can run as another user with no rights, and chroot itself into the directory.
Step 2: Install DNSCrypt
Find the right DNSCrypt version for you at this link:
http://download.dnscrypt.org/dnscrypt-proxy/
You’re going to have to unzip it and compile it. Traverse to the folder you’ve just unzippzed and run the following commands:
- ./configure
- make
- make install
I personally have to run “make install” twice. No clue why.
Step 3: Configure DNS
Change your DNS settings to 127.0.0.1 in your network manager. Click the “wifi” area in the top right corner
and go to “edit connections”. Select the network, and hit ‘Edit…’ then go to IPV4 Settings.
Make sure the Method is “Automatic (DHCP) Addresses Only” and set DNS Servers to 127.0.0.1
Step 4: Run DNSCrypt
Run the following command
dnscrypt-proxy --daemonize --user=dnscrypt
Step 5:
You can add the above command to /etc/rc.local so that it runs at bootup. You should also add the following command:
mkdir /run/dnscrypt
That way there’s a folder to move to.
That should be all it takes. Let me know how it works.
edit: You may need to install libsodium in newer versions, info here:
https://github.com/jedisct1/libsodium
blog comments powered by Disqus