GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Installation linux Installation linux
Frank Denis edited this page
Unfortunately, providing universal installation instructions for Linux is impossible, since there are many distributions, each working in its own way, especially when it comes to configuring system settings (DNS). Furthermore, recent Linux distributions depend on systemd and often install a DNS service by default. Extra steps are thus needed to either remove it, or combine it with dnscrypt-proxy. If you are new to Linux, installing a new DNS cache and changing the DNS settings may surprisingly be one of the most complicated tasks you will ever have to do. Usually you will want just a single program to serve the DNS protocol on port 53 by way of disabling the competing services.
(Please report issues with third-party packages directly to the relevant package maintainers.) Kernel requirements (from golang's minimum requirements):
On most Linux distributions, the If you already have a local DNS cache, it has to be eventually replaced with dnscrypt-proxy. Both can be used simultaneously, but this is outside of the scope of this guide (or, at least, of this Wiki page). Type the following command: ss -lp 'sport = :domain'This may output something similar to: Uninstall the corresponding package (in the above example: You may also see the port being served by systemctl stop systemd-resolved systemctl disable systemd-resolved Check that nothing is listening to port 53 any more: ss -lp 'sport = :domain'Looks fine? Let's move to the next step. Download dnscrypt-proxy here: dnscrypt-proxy binaries. There are quite a few files here, but you only need one, matching your operating system and architecture.
So, download this file and extract it wherever you want. It can be in your home directory, in You're going to install a new command and important configuration files on your system. If you're new to Linux, for good hygiene, you can quickly check that the directory you extracted cannot be modified by other system users. Here's one way to do it. Type: sudo -u \#1 touch . (don't forget the final If the command asks for a password, enter your password. If the command immediately returns without printing an error, it's recommended to check the permissions of this directory and all its parent directories (tutorial on Linux permissions). It is totally possible to have the executable file in one place, the configuration file in another place, the cache files elsewhere and the log files yet somewhere else. But if this is the first time you install the software, and you don't have any good reasons to make things more complicated than they should be, just keep everything in the same directory. At least to start with, and to ensure that everything works as expected. Then, go crazy if you like. But please don't change everything before even starting the proxy once, and then complain that "it doesn't work". Start with something boring, and gradually tweak it. If you really need to. Also, do not change your DNS settings at this point. Just create a configuration file based on the example one: cp example-dnscrypt-proxy.toml dnscrypt-proxy.toml And now, for something intense, go to the dnscrypt-proxy directory, and type: ./dnscrypt-proxy Does it look like it started properly? If not, try to find out why. Here are some hints:
No errors? Amazing! Don't close the terminal window yet. We're going to change the system DNS settings. Does your system have a directory called apt-get remove resolvconf Now, make a backup of the cp /etc/resolv.conf /etc/resolv.conf.backup Then delete the rm -f /etc/resolv.conf And create a new Let's check that everything works by sending a first query using dnscrypt-proxy: ./dnscrypt-proxy -resolve example.com Looks like it was successfully able to resolve If anything ever goes wrong and you want to revert everything:
Hit You must still be in the The The message Type Are you satisfied? Good, let's jump to step 6! Hit Now, register this as a system service (still with ./dnscrypt-proxy -service install If it doesn't spit out any errors, this is great! Your Linux distribution is compatible with the built-in installer. This assumes that the executable and the configuration file are in the same directory. If you didn't follow these recommendations, you're on your own modifying the unit files. Now that it's installed, it can be started: ./dnscrypt-proxy -service start Done! If it does spit out errors, additional steps for your Linux distribution are required. Stay calm, do not drink coffee, but hit the gym instead, then look for specific instructions.
Want to stop the service? ./dnscrypt-proxy -service stop Want to restart the currently running service after a configuration file change? ./dnscrypt-proxy -service restart Want to uninstall the service? ./dnscrypt-proxy -service uninstall Want to check that DNS resolution works? ./dnscrypt-proxy -resolve example.com Want to completely delete that thing? Delete the directory. Done. Uncomment the Edit it, then type the following command (in a root console) to lock it: chattr +i /etc/resolv.conf To unlock it: chattr -i /etc/resolv.conf It is still possible that setting the Save and close the file. Notes:
Then, a surefire way to get the new configuration taken into account by all applications is to restart the system. Finally, if DHCP is in use and Additional recommended reading: the Some systems may be able to reach out to DNS-over-HTTPS (DoH) servers over HTTP and DNSCrypt over TCP, but not DNSCrypt servers over UDP nor DoH servers over HTTP/3. An illustration is timeouts for DNSCrypt servers in the default configuration: In that case, make sure that iptables -A OUTPUT -p udp --sport 443 -j ACCEPT and then restart In order to install a new version, just replace the executable file ( Some Linux distributions ship This is unsupported. Do not open issues here if you experience issues with such a configuration. For experienced Linux users who really want to use this, there is a dedicated page: dnscrypt-proxy with systemd. The easiest way to keep the proxy up to date is to use an operating system or distribution that always ships up-to-date packages. As an alternative, for Linux, these instructions might help: Updates.
Clone this wiki locally |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |