How To Install DNSCrypt on OpenWrt

Install DNSCrypt on OpenWrt

In this tutorial we will show you how to install and configuration of DNSCrypt on your OpenWrt router.  For those of you who didn’t know, DNSCrypt is a tool for securing communications between a client and a DNS resolver using elliptic-curve cryptography in the same way the SSL turns HTTP web traffic into HTTPS encrypted Web traffic. With DNSCrypt it can preventing spying, spoofing, and man-in-the-middle attacks or even bypass DNS censorship from ISP that using DNSLeak.

This article assumes you have at least basic knowledge of linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, I will show you step by step installation DNSCrypt on a OpenWrt.

Install DNSCrypt on OpenWrt

Step 1. Installing DNSCrypt.

DNSCrypt is managed by a source NOT directly included in opkg lists. So, first step is to add the Source to opkg list by adding following line at the end of ‘/etc/opkg.conf’.

And proceed with the installation:

Confirm that the installation:

Step 2. Configuration DNSCrypt.

The config file /etc/config/dnscrypt-proxy is simple and should be edited according to your needs:

Now we will start DNSCrypt and enable auto boot for it:

If dnscrypt-proxy is not starting after a router reboot, it may be trying to start before the network interface is fully up. Add the following to /etc/rc.local, above the line “exit 0”:

Next, Edit ‘/etc/config/dhcp’ so that the ‘dnsmasq’ configuration looks like below:

Restart dnsmasq for the changes to take effect:

Congratulation’s! You have successfully installed DNSCrypt. Thanks for using this tutorial for installing DNSCrypt on your OpenWrt router system. For additional help or useful information, we recommend you to check the official DNSCrypt website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get a best deal!