Secure name resolution with DNS-over-TLS
Testing the Implementation
Without validation, configuration changes are just optimistic adjustments. By testing, you ensure that your system uses the specified DNS servers and also that the DNS queries are encrypted, guaranteeing the privacy and security boost DoT promises.
To check the active DNS server, enter
resolvectl status | grep 'Current DNS Server'
If the output matches the specified servers (e.g., 1.1.1.1
), it's a preliminary indication things are on track.
Monitoring DNS Traffic for Encryption
DoT is a fundamental security feature for modern networks, but like all systems, DoT requires vigilance. One cannot simply enable and forget; it must be actively monitored.
Before you can monitor traffic on your interface, you need to determine its name using the ip a
or ip addr show
command:
ip a
This command provides a list of all network interfaces. Typically, wired connections are represented as ethX
(e.g., eth0
), while wireless connections are often labeled as wlanX
(e.g., wlan0
).
Look for the interface that has an Inet address (IPv4) or Inet6 address (IPv6) associated with it and is UP
. This is typically the active network interface. For instance, the output might look like Listing 1.
Listing 1
Output Showing All Network Interfaces
01 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 02 inet 192.168.1.10/24 brd 192.168.1.255 scope global dynamic eth0
In Listing 1, eth0
is the active network interface.
Monitoring with tcpdump
Now that you've identified your active network interface, utilize tcpdump
to monitor DNS traffic. With DoT, monitoring becomes critical to ensure encryption is active. To monitor your DNS traffic, use
sudo tcpdump -i eth0 -n 'port 853'
Replace eth0
with your identified interface.
With the above command, tcpdump
intercepts and logs network traffic. If DoT is functional, the domain names accessed won't appear in plaintext. DoT operates via port 853, with encrypted queries passing through it.
While tcpdump
is active, access a few websites. Instead of recognizable domain names, you'll largely see encrypted data, verifying the effectiveness of your DoT setup.
The importance of regular traffic monitoring can't be overstated. Monitoring helps identify unusual traffic patterns and potential security breaches, while also ensuring that DoT operates without hitches. Of course, tools like DoT are only part of the solution for maintaining a secure environment. You're still only as safe as your system is, which means you can never escape the need for regular audits and system updates (see the box entitled "Keeping the System Up to Date").
Keeping the System Up to Date
Every system, regardless of its purpose, is a potential target. As such, keeping systems updated is not a luxury, but a necessity.
On Apt-based Linux systems, system and package updates are as easy as
sudo apt update && sudo apt upgrade
Regular updates patch vulnerabilities and ensure optimal performance. This not only keeps the DoT setup solid but the entire system secure.
Periodic security audits are also important. Tools like Nmap or Wireshark will help you monitor and review network traffic. Be sure only necessary ports are open and accessible, and regularly review and update configurations, ensuring that no deprecated protocols or software are in use.
« Previous 1 2 3 Next »
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Red Hat Adds New Deployment Option for Enterprise Linux Platforms
Red Hat has re-imagined enterprise Linux for an AI future with Image Mode.
-
OSJH and LPI Release 2024 Open Source Pros Job Survey Results
See what open source professionals look for in a new role.
-
Proton 9.0-1 Released to Improve Gaming with Steam
The latest release of Proton 9 adds several improvements and fixes an issue that has been problematic for Linux users.
-
So Long Neofetch and Thanks for the Info
Today is a day that every Linux user who enjoys bragging about their system(s) will mourn, as Neofetch has come to an end.
-
Ubuntu 24.04 Comes with a “Flaw"
If you're thinking you might want to upgrade from your current Ubuntu release to the latest, there's something you might want to consider before doing so.
-
Canonical Releases Ubuntu 24.04
After a brief pause because of the XZ vulnerability, Ubuntu 24.04 is now available for install.
-
Linux Servers Targeted by Akira Ransomware
A group of bad actors who have already extorted $42 million have their sights set on the Linux platform.
-
TUXEDO Computers Unveils Linux Laptop Featuring AMD Ryzen CPU
This latest release is the first laptop to include the new CPU from Ryzen and Linux preinstalled.
-
XZ Gets the All-Clear
The back door xz vulnerability has been officially reverted for Fedora 40 and versions 38 and 39 were never affected.
-
Canonical Collaborates with Qualcomm on New Venture
This new joint effort is geared toward bringing Ubuntu and Ubuntu Core to Qualcomm-powered devices.