summaryrefslogtreecommitdiff
path: root/content/blog/dns-over-tls.md
blob: 5a52b62f5f300285f35faa57855888efb6f03696 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
---
title: "DNS over TLS on Arch Linux"
date: 2020-08-20
slug: "dns-over-tls"
draft: false
---

Domain name resolution is not standardized, some application use NSS, some use D-Bus, others use stub resolvers.
`systemd-resolved` handles all of them and comes with systemd that Arch Linux uses.

`systemd-resolved` configuration file is at `/etc/systemd/resolved.conf`, yours should look like this:

	[Resolve]
	DNS=1.1.1.1
	FallbackDNS=127.0.0.1 ::1
	Domains=~.
	#LLMNR=yes
	#MulticastDNS=yes
	DNSSEC=yes
	DNSOverTLS=yes
	#Cache=yes
	#DNSStubListener=yes
	#ReadEtcHosts=yes

You should enable the `systemd-resolved` service.

	sudo systemctl enable --now systemd-resolved

## NetworkManager

Since you are probably using NetworkManager,
you should tell it to use `systemd-resolved` by going to its configuration file (`/etc/NetworkManager/NetworkManger.conf`)
and specifying `dns` property.

This is how your `/etc/NetworkManager/NetworkManger.conf` should look like:

	[main]
	plugins=keyfile
	dns=systemd-resolved

**You will probably need to restart your computer for changes to take effect.**

If you found any mistakes or that something is outdated, please [contact me](/contact/).