Solution to access problems on some sites on Türkiye Location VPS.

 

 

Install DNSCrypt-Proxy (DEBİAN)

debian testing

sudo apt update && \
sudo apt install -t testing dnscrypt-proxy
debian unstable

sudo apt update && \
sudo apt install -t unstable dnscrypt-proxy

Install DNSCrypt-Proxy (UBUNTU)

DNSCrypt-Proxy 2.x is included in Ubuntu 18.10+ repositories, install it with

sudo apt install dnscrypt-proxy

 

Copy the example configuration files to /etc/dnscrypt-proxy/

/etc/dnscrypt-proxy/ is where the Debian/Ubuntu package expects the dnscrypt-proxy configuration to be.

So, type the following commands to copy the examples to that directory:

sudo cp /usr/share/doc/dnscrypt-proxy/examples/* /etc/dnscrypt-proxy/
cd /etc/dnscrypt-proxy
cp example-dnscrypt-proxy.toml dnscrypt-proxy.toml

The last step is important. You should overwrite the existing dnscrypt-proxy.toml with the example.

Check if the configuration is correct

Type:

cd /etc/dnscrypt-proxy
dnscrypt-proxy -check

Install the service

If everything appears to be working fine, stop the proxy by hitting Ctrl+C and/or by closing the terminal window.

Now, it’s time to configure it to start automatically at boot:

cd /etc/dnscrypt-proxy
sudo dnscrypt-proxy -service install
sudo dnscrypt-proxy -service start

Whenever you change the configuration, the service can be restarted with the following command:

sudo dnscrypt-proxy -service restart

Note that if you ever want to stop dnscrypt-proxy from running at boot (obviously, don’t do it now as the next steps wouldn’t work), type:

sudo dnscrypt-proxy -service stop
sudo dnscrypt-proxy -service uninstall

Configure the systemd DNS to use dnscryt-proxy

Type:

sudo nano /etc/systemd/resolved.conf

Locate the [Resolve] section. There should be a line like the following:

#DNS=

Replace it with:

DNS=127.0.0.1

Save the file, and restart the systemd DNS cache:

sudo systemctl restart systemd-resolved

Done! Your system is now using dnscrypt-proxy to secure and anonymize your DNS traffic.