Ativar DNS over TLS no Linux com systemd-resolved
Atualmente, systemd-resolved gerencia as configurações de DNS na maioria das distribuições Linux. Geralmente usado com o NetworkManager para oferecer configurações por link, mas isso não nos possibilita ativar DNS seguro, ou DNS over TLS. Siga as instruções abaixo para ativar na sua distro.
Configurando systemd-resolved
Crie um arquivo em /etc/systemd/resolve.conf.d/99-dot.conf
com o seguinte conteúdo. Isso irá criar uma configuração global para o systemd-resolved com DoT e DNSSEC habilitados. Você pode remover a opção de DNSSEC, caso queira.
Disativar DNS no NetworkManager
Para evitar que o NetworkManager configure endereços de DNS, crie o arquivo /etc/NetworkManager/conf.d/dns.conf
com o seguinte conteúdo.
Verificando
Depois dos passos acima, reinicie seu sistema. Depois execute resolvectl status
, você devará ver a saída abaixo.
Depois, acesse https://1.1.1.1/help
e você deverá ver a resposta abaixo.