How to use DNS over TLS on Ubuntu Linux

If you are interested in computer security, you probably know how standard DNS isn't. Why? Because, by default, DNS queries are not encrypted. That means DNS can (and often is) exploited. To overcome that weakness, DNS can be used in which all DNS queries are processed via the encrypted TLS (Transport Layer Secure) protocol. However, most operating systems do not work with DNS over TLS (DoT).

Fortunately, Linux users can simply make this a reality.

Today's article will show you how easy it is to add DNS over TLS on Ubuntu 18.04. To do this, the article will use Stubby, an open source primitive DNS handler, that encrypts the DNS queries sent from the client to the DNS Privacy resolver, helping to enhance the privacy of people. end use. The installation process will be done on Ubuntu Desktop 18.04. All you need is the latest version of this Ubuntu platform and the user account with sudo rights. Find out the installation process right away!

Manage DNS over TLS on Ubuntu Linux with Stubby

  1. Setting
  2. Check the settings
  3. Stubby configuration
  4. Use Stubby

Setting

Installing Stubby is easy. Open a terminal window and enter the following commands:

 sudo apt-get update sudo apt-get install stubby 

When the installation is complete, start and activate Stubby with the following commands:

 sudo systemctl start stubby sudo systemctl enable stubby 

Check the settings

Use the netstat tool to make sure Stubby is properly installed. If netstat is not installed, do so with the following command:

 sudo apt-get install net-tools 

When this installation is complete, enter the following command:

 sudo netstat -lnptu | grep stubby 

You will see that Stubby is 'listening' to localhost (127.0.0.1) on port 53.

How to use DNS over TLS on Ubuntu Linux Picture 1

Stubby configuration

Stubby is running perfectly well. If you want to make any configuration changes, look for the configuration file in /etc/stubby/stubby.yml. In that file, you will notice, Stubby uses (by default) the DNS services that support TLS:

  1. dnsovertls.sinodun.com
  2. dnsovertls1.sinodun.com
  3. getdnsapi.net

Below, you will find the Additional servers section. There are several DNS servers over other TLS available here, such as:

  1. dns.quad9.net
  2. unicast.censurfridns.dk
  3. dnsovertls3.sinodun.com
  4. dnsovertls2.sinodun.com
  5. dns.cmrg.net
  6. dns.larsdebruin.net
  7. securedns.eu

Some additional servers are listed with conditions that describe weaknesses or features that do not work. Users can also add additional DNS over TLS servers in this section. For example, Cloudflare DNS over TLS servers can be added as follows:

 #CloudFlare DNS over TLS servers - address_data: 1.1.1.1 tls_auth_name: "cloudflare-dns.com" - address_data: 1.0.0.1 tls_auth_name: "cloudflare-dns.com" 

Use Stubby

At this point, users need to notify Systemd to actually use Stubby for DNS queries. To do so, open the Network Settings application and click the gear icon associated with your network connection. In the results window, click the IPv4 tab and set DNS Automatic to OFF. Next, in the DNS text field, enter 127.0.0.1. Click Save to apply the changes.

How to use DNS over TLS on Ubuntu Linux Picture 2

To help the system identify changes, enter the command:

 sudo systemctl restart NetworkManager 

That's all the steps to do. Stubby is currently responsible for handling DNS over TLS. Your DNS queries are now encrypted, so you can be a bit more secure about Ubuntu Desktop.

Good luck!

See more:

  1. Set up ProFTPd with TLS on Ubuntu 11.04
  2. How to change Google DNS on Linux
  3. How to configure DNS Server on Ubuntu Server 11.04
5 ★ | 1 Vote

May be interested

  • 5 things to do when installing Ubuntu on PC5 things to do when installing Ubuntu on PC
    ubuntu is a powerful linux distribution suitable for a wide variety of use cases, ideal for both beginners and seasoned linux users.
  • How to Enable Oracle Java in Your Web Browsers on Ubuntu LinuxHow to Enable Oracle Java in Your Web Browsers on Ubuntu Linux
    this document covers enabling 32-bit and 64-bit oracle java browser plugin in 32-bit ubuntu linux and 64-bit ubuntu linux. for the two most popular web browsers for ubuntu linux at this time, which are google chrome and mozilla firefox....
  • Instructions for uninstalling software on UbuntuInstructions for uninstalling software on Ubuntu
    tipsmake.com will guide you how to uninstall the software on a computer running ubuntu linux, as well as how to remove ubuntu from your computer. if your computer runs linux and another operating system simultaneously, you can remove the ubuntu linux partition.
  • Pop! _OS What is it? Is it like Ubuntu?Pop! _OS What is it?  Is it like Ubuntu?
    a few weeks ago, pop! _os was officially released for the first time and available for download. today, we will find out if pop os! _os is cool and compared to ubuntu, it's different.
  • Compare Fedora and UbuntuCompare Fedora and Ubuntu
    fedora and ubuntu are two of the most popular and well-supported linux-based desktop operating systems. so between fedora and ubuntu, which option is right for you?
  • Create your own Linux distribution with Ubuntu ImagerCreate your own Linux distribution with Ubuntu Imager
    have you ever wanted to create your own linux distribution but don't know where to start? it's easier than you think. distroshare ubuntu imager creates a live iso that can be installed from an ubuntu or derivative distribution.
  • How to Set Up an FTP Server on Ubuntu LinuxHow to Set Up an FTP Server on Ubuntu Linux
    today's tipsmake will guide you how to set up and connect to an ftp server on a computer running the ubuntu linux operating system. ftp servers are useful for storing data from your computer and allowing others to browse those files. to establish a connection from a computer, you need an ftp server. you also need to update to the latest version of ubuntu.
  • How to Get Help for UbuntuHow to Get Help for Ubuntu
    although ubuntu is considered to be one of the best linux distributions for newcomers, you still may find yourself in need of help whether this is your first time using a linux based os or if you're an experienced user. making the switch...
  • Instructions for installing VLC 1.1 from Git in Ubuntu LinuxInstructions for installing VLC 1.1 from Git in Ubuntu Linux
    with many improvements in version 1.1, many ubuntu users are quite eager to become the first to enjoy vlc's gadgets.
  • Update Linux kernel on Ubuntu via UKUUUpdate Linux kernel on Ubuntu via UKUU
    linux kernel on ubuntu is the core of this operating system. it is the intermediate interface between computer hardware and software applications.