Access to Discord and similar sites and ping problem solution [Ubuntu / Debian]

How to Use the Hostiger dnscrypt Installation Script

This script automates the installation and configuration of dnscrypt-proxy on your system. Here’s how to use it:

  1. Download the script: You can download the script using wget or curl:

    wget https://hostiger.com/scripts/hostiger_dnscrypt_install.sh
    # or
    curl -O https://hostiger.com/scripts/hostiger_dnscrypt_install.sh
    
  2. Make the script executable: Give the script execute permissions:

    chmod +x hostiger_dnscrypt_install.sh
    
  3. Run the script with root privileges: Execute the script using sudo:

    sudo ./hostiger_dnscrypt_install.sh
    
  4. Follow the on-screen instructions: The script will guide you through the installation process. It will ask you to select a resolver.

  5. Restart systemd-resolved: After the script finishes, restart the systemd-resolved service to apply the changes:

    sudo systemctl restart systemd-resolved
    

Important Notes:

  • This script is designed for Debian/Ubuntu-based systems.
  • Make sure your system is up-to-date before running the script: sudo apt update && sudo apt upgrade -y
  • You need root privileges (using sudo) to run the script.
  • The script automatically configures dnscrypt-proxy to start on boot.

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.