Quantcast
Channel: Gigarocket Forum - All Forums
Viewing all articles
Browse latest Browse all 1923

Setting up dnscrypt-proxy on Windows

$
0
0
Okay, this is just a quick and dirty write-up. The biggest problem with dnscrypt-proxy is that it only provides you with a single DNS server at a time. Using this method you can have as many servers as you want.

Okay, so to start with get the LATEST-win64-full.zip file from here. Extract it and move the folder wherever you want to run dnscrypt-proxy from (Program Files is a fine choice). Now, open up the folder and create two text files, rename them Install.bat and Uninstall.bat. Next, choose what servers you want to use - open up the dnscrypt-resolvers.csv file - you can use Excel if you have it installed, or wordpad or notepad. Each server has its short name to the far-left of each new line. I personally recommend using the d0wn servers, and choosing the closest server to your location to use as your primary server, and then whatever's the next closest options for you. The short name of your servers is all you need to know. I'm in Australia, so these are the 5 I choose: 
  1. d0wn-au-ns1
  2. d0wn-id-ns1
  3. d0wn-sg-ns1
  4. d0wn-sg-ns2
  5. d0wn-hk-ns1
Now edit your Install.bat file in notepad and paste in this:
Code:
@echo off
dnscrypt-proxy.exe -R d0wn-au-ns1 -a 127.0.0.1:53 --install --service-name=dnscrypt-proxy
dnscrypt-proxy.exe -R d0wn-id-ns1 -a 127.0.0.2:53 --install --service-name=dnscrypt-proxy-2nd
dnscrypt-proxy.exe -R d0wn-sg-ns1 -a 127.0.0.3:53 --install --service-name=dnscrypt-proxy-3rd
dnscrypt-proxy.exe -R d0wn-sg-ns2 -a 127.0.0.4:53 --install --service-name=dnscrypt-proxy-4th
dnscrypt-proxy.exe -R d0wn-hk-ns1 -a 127.0.0.5:53 --install --service-name=dnscrypt-proxy-5th

Change each server name to the servers you want to use and save the file. In your Uninstall.bat file just paste this:
Code:
@echo off
dnscrypt-proxy.exe --uninstall --service-name=dnscrypt-proxy
dnscrypt-proxy.exe --uninstall --service-name=dnscrypt-proxy-2nd
dnscrypt-proxy.exe --uninstall --service-name=dnscrypt-proxy-3rd
dnscrypt-proxy.exe --uninstall --service-name=dnscrypt-proxy-4th
dnscrypt-proxy.exe --uninstall --service-name=dnscrypt-proxy-5th

Okay, now you have two files that can Install and Uninstall the services to run dnscrypt-proxy. Since they make system changes, they need to be run from an elevated command prompt (you can right click and select "Run as Administrator") or they won't make any changes. Run the install file.

Check each of your servers is running - from the command prompt you can use nslookup like so:

nslookup host server

Where the host is the domain name you wish to look up and the server is the DNS server you wish to use. For example to check google.com using 127.0.0.4 type:

nslookup google.com 127.0.0.4

Google.com is a good example here because each server will usually return a different set of IPs which is one way that Google uses to load balance their requests. Check each of your servers to ensure you get a response, and that the response time is fast. Your primary server should be instantaneous.

If all is good then all you need to do now is set each of your Network Adapters to use your dnscrypt-proxy servers. Do this for each connection type (LAN, Bluetooth, Wi-Fi): 
  1. Right-click on the Network Adapter and select "Properties".
  2. Scroll down to Internet Protocol Version 6 (TCP/IPv6), and deselect it.
  3. Scroll down to Internet Protocol Version 4 (TCP/IPv4), select it and click Properties.
  4. Select "Use the following DNS server addresses" and enter 127.0.0.1 and 127.0.0.2.
  5. Click Advanced then DNS and then add each of your additional servers 127.0.0.3, 127.0.0.4, and 127.0.0.5.
  6. Click OK then OK then Close.
That's it. To uninstall later you need to first go into your adapter settings and select "Obtain DNS sever address automatically" (at step 4 above) then close out of the adapter settings, and then you can uninstall the dnscrypt-proxy services using the uninstall file you made earlier run from an elevated command prompt.

If you ever want to change servers, you don't need to uninstall first - just open up your install.bat file in notepad and change the server names to whatever you want, and run it from an elevated command prompt. This is necessary if the servers are removed in a future release - whenever you update dnscrypt-proxy always check your selected dns servers - if they've been removed from the csv file you can no longer use them.

Viewing all articles
Browse latest Browse all 1923

Trending Articles