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 (Windows)

Download : goodbyedpi-0.2.3rc3-turkey.zip


Using GoodbyeDPI

There are two methods for using the Turkish fork of GoodbyeDPI: using it by installing a service, and using it by running a batch file. When using the service installation method, you only need to install the service once, and then it will automatically run every time your computer restarts without requiring you to manually run anything. When using the batch file method, you need to manually start the batch file each time (GoodbyeDPI usage ends when the batch window is closed).

Using by Installing a Service (Automatically runs when Windows starts)

To use the Turkish fork of GoodbyeDPI by installing a service:

  1. Download the goodbyedpi-0.2.3rc3-turkey.zip file to your computer.
  2. Extract the ZIP file to any directory.
  3. Right-click on the service_install_dnsredir_turkey.cmd file from the extracted files and select the Run as administrator option.
  4. Press any key in the console window that opens.
  5. The window will close automatically when the service is installed, and the service will also start automatically.

Note: This process will install the GoodbyeDPI service on your computer. To remove the GoodbyeDPI service from your computer, you need to run the service_remove.cmd file (located in the extracted files) as administrator.

Using with a Batch File (One-time use, ends when the window is closed)

To use the Turkish fork of GoodbyeDPI by running a batch file (a command window opens and the application starts running; it stops running when this window is closed):

  1. Download the goodbyedpi-0.2.3rc3-turkey.zip file to your computer.
  2. Extract the ZIP file to any directory.
  3. Right-click on the turkey_dnsredir.cmd file from the extracted files and select the Run as administrator option.

Note: GoodbyeDPI will be active when you run the turkey_dnsredir.cmd file as administrator. However, when run with this method, you will have to manually open GoodbyeDPI every time your computer restarts, and GoodbyeDPI will be deactivated when the window opened with turkey_dnsredir.cmd is closed.

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.

Temporary failure in name resolution

Let’s break down the process of fixing the “Temporary failure in name resolution” error by modifying the /etc/resolv.conf file and restarting the systemd-resolved service.

Understanding the Problem: “Temporary failure in name resolution”

This error indicates that your system cannot translate domain names (like [geçersiz URL kaldırıldı]) into IP addresses (like 172.217.160.142). This translation is the job of the Domain Name System (DNS). When your system can’t reach a DNS server or there’s a problem with the DNS configuration, you encounter this error, preventing you from accessing websites and other network resources by name.

The Solution: Modifying /etc/resolv.conf and Restarting systemd-resolved

  1. /etc/resolv.conf – The DNS Configuration File: This file contains the DNS settings for your system. The most important setting here is nameserver, which specifies the IP address of a DNS server.

  2. Adding Google Public DNS Servers: By adding nameserver 8.8.8.8 and nameserver 8.8.4.4 to /etc/resolv.conf, you’re instructing your system to use Google Public DNS servers. These are reliable and widely available DNS servers.

    • 8.8.8.8: Google Public DNS primary server.
    • 8.8.4.4: Google Public DNS secondary server.
  3. The nano Command: sudo nano /etc/resolv.conf opens the /etc/resolv.conf file in the nano text editor with root privileges (required to modify system files).

  4. Restarting systemd-resolved: sudo systemctl restart systemd-resolved.service restarts the systemd-resolved service. This service is responsible for resolving domain names on systems using systemd (which is most modern Linux distributions). Restarting it ensures that the changes you made to /etc/resolv.conf are applied.

Step-by-step Instructions:

  1. Open your terminal.

  2. Edit the /etc/resolv.conf file:

    Bash

    sudo nano /etc/resolv.conf
    
  3. Add the following lines at the end of the file:

    nameserver 8.8.8.8
    nameserver 8.8.4.4
    

    If there are other nameserver lines in this file, adding these lines below them will prioritize Google’s DNS servers.

  4. Save the file (in nano, press Ctrl+X, then Y, then Enter).

  5. Restart the systemd-resolved service:

    Bash

    sudo systemctl restart systemd-resolved.service
    
  6. Test your internet connection by trying to access a website.

Important Note: On many modern Linux systems that use systemd-resolved, directly editing /etc/resolv.conf is not the recommended long-term solution. The file is often dynamically generated. Changes made directly to this file may be overwritten on reboot or network changes.

A More Permanent Solution (using resolved.conf):

A better approach is to modify /etc/systemd/resolved.conf and then restart the service.

  1. Edit /etc/systemd/resolved.conf:
    Bash

    sudo nano /etc/systemd/resolved.conf
    
  2. Uncomment (remove the #) and change the DNS= lines to:
    DNS=8.8.8.8 8.8.4.4
    #FallbackDNS=
    
  3. Restart the systemd-resolved service:
    Bash

    sudo systemctl restart systemd-resolved.service
    

This method ensures that your DNS settings persist across reboots.