How To Install nss-tlsd on Debian 12

Learn how to install nss-tlsd on Debian 12 with this tutorial. nss-tlsd is encrypted DNS name resolution daemon

Introduction

In this tutorial we learn how to install nss-tlsd on Debian 12.

What is nss-tlsd

nss-tlsd is:

nss-tls is an alternative, encrypted name resolving library to use with glibc, which uses DNS-over-HTTPS (DoH).

The glibc name resolver can be configured through nsswitch.conf(5) to use nss-tls instead of the DNS resolver, or fall back to DNS when nss-tls fails.

This way, all applications that use the standard resolver API (getaddrinfo(), gethostbyname(), etc’), are transparently migrated from DNS to encrypted means of name resolving, with zero application-side changes and minimal resource consumption footprint. However, nss-tls does not deal with applications that use their own, built-in DNS resolver.

This package contains the daemon to be used in conjunction with the libnss-tls NSS module. The daemon runs in the background, receives name resolving requests over a Unix socket and replies with resolved addresses.

There are three methods to install nss-tlsd on Debian 12. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install nss-tlsd Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install nss-tlsd using apt-get by running the following command:

sudo apt-get -y install nss-tlsd

Install nss-tlsd Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install nss-tlsd using apt by running the following command:

sudo apt -y install nss-tlsd

Install nss-tlsd Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install nss-tlsd using aptitude by running the following command:

sudo aptitude -y install nss-tlsd

How To Uninstall nss-tlsd on Debian 12

To uninstall only the nss-tlsd package we can use the following command:

sudo apt-get remove nss-tlsd

Uninstall nss-tlsd And Its Dependencies

To uninstall nss-tlsd and its dependencies that are no longer needed by Debian 12, we can use the command below:

sudo apt-get -y autoremove nss-tlsd

Remove nss-tlsd Configurations and Data

To remove nss-tlsd configuration and data from Debian 12 we can use the following command:

sudo apt-get -y purge nss-tlsd

Remove nss-tlsd configuration, data, and all of its dependencies

We can use the following command to remove nss-tlsd configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge nss-tlsd

Dependencies

nss-tlsd have the following dependencies:

References

Summary

In this tutorial we learn how to install nss-tlsd package on Debian 12 using different package management tools: apt, apt-get and aptitude.