# Can someone help me setup DNS-over-HTTPS / DNS-over-TLS

**URL:** <https://forum.endeavouros.com/t/can-someone-help-me-setup-dns-over-https-dns-over-tls/54274>\
**Category:** Newbie\
**Created:** [April 23, 2024, 8:43am UTC](https://forum.endeavouros.com/t/can-someone-help-me-setup-dns-over-https-dns-over-tls/54274 "2024-04-23T08:43:53Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![android](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/android/32/82854_2.png) [@android](https://forum.endeavouros.com/u/android)\
**Post date:** [April 23, 2024, 8:43am UTC](https://forum.endeavouros.com/t/can-someone-help-me-setup-dns-over-https-dns-over-tls/54274/1 "2024-04-23T08:43:53Z")

</div>

Hello,

My goal is to use the [Mullvad DNS over HTTPS or DNS over TLS](https://mullvad.net/en/help/dns-over-https-and-dns-over-tls) service.  
They provide a [setup tutorial for Linux](https://mullvad.net/en/help/dns-over-https-and-dns-over-tls#linux) using systemd-resolved but I don’t use systemd-resolved - so it’s not applicable to me.

* * *

**So here is my question: How can I setup DNS over HTTPS or DNS over TLS in an easy way on KDE Plasma?**

* * *

I found the [DNS-over-HTTPS Arch Wiki page](https://wiki.archlinux.org/title/DNS-over-HTTPS) but I am already having troubles with one of the first steps (also I don’t know if the `dns-over-https` is the easiest way):

> 2.2 Change system DNS server
> 
> **Change your system’s DNS server to an address in the `listen = ` section of the configuration file. If you don’t know what you’re doing, `127.0.0.1` is recommended.**
> 
> This can be accomplished either through your [Network Manager](https://wiki.archlinux.org/title/Network_configuration#Network_managers) or through editing [/etc/resolv.conf](https://wiki.archlinux.org/title//etc/resolv.conf).

because Network Manager seems to manage my `/etc/resolv.conf` file and all manual edits get removed again:

```auto
❯ bat /etc/resolv.conf
───────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: /etc/resolv.conf
───────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1 │ # Generated by NetworkManager
   2 │ search fritz.box
...

```

Any help and ideas would be appreciated.

Thank you.

---

<div class="post-metadata">

**Author:** ![pebcak](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/pebcak/32/100472_2.png) [@pebcak](https://forum.endeavouros.com/u/pebcak)\
**Post date:** [April 23, 2024, 9:17am UTC](https://forum.endeavouros.com/t/can-someone-help-me-setup-dns-over-https-dns-over-tls/54274/2 "2024-04-23T09:17:42Z")

</div>

> [@android](#):
>
> Network Manager seems to manage my `/etc/resolv.conf` file and all manual edits get removed again

To prevent this, you could create a file called `dns.conf` in `/etc/NetworkManager/conf.d` with the following content:

```auto
[main]
dns=none

```

---

<div class="post-metadata">

**Author:** ![android](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/android/32/82854_2.png) [@android](https://forum.endeavouros.com/u/android)\
**Post date:** [April 23, 2024, 9:23am UTC](https://forum.endeavouros.com/t/can-someone-help-me-setup-dns-over-https-dns-over-tls/54274/3 "2024-04-23T09:23:27Z")

</div>

Thank you, I’ll give it a try and see how far along I come this time :).

---

<div class="post-metadata">

**Author:** ![firefly](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/firefly/32/67235_2.png) [@firefly](https://forum.endeavouros.com/u/firefly)\
**Post date:** [April 23, 2024, 10:26am UTC](https://forum.endeavouros.com/t/can-someone-help-me-setup-dns-over-https-dns-over-tls/54274/4 "2024-04-23T10:26:37Z")

</div>

> [@android](#):
>
> This can be accomplished either through your [Network Manager](https://wiki.archlinux.org/title/Network_configuration#Network_managers) or through editing [/etc/resolv.conf](https://wiki.archlinux.org/title//etc/resolv.conf).

Doesn’t this mean that you can also open your Network Manager (connection settings), set “Method” to “Automatic (Only addresses)” and where you have DNS field just enter 127.0.0.1?

You don’t **have to** manually edit `etc/resolv.conf`

---

<div class="post-metadata">

**Author:** ![Zesko](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/zesko/32/77795_2.png) [@Zesko](https://forum.endeavouros.com/u/Zesko)\
**Post date:** [April 23, 2024, 1:40pm UTC](https://forum.endeavouros.com/t/can-someone-help-me-setup-dns-over-https-dns-over-tls/54274/5 "2024-04-23T13:40:58Z")

</div>

AFAIK, NetworkManager generates or overwrite `/etc/resolv.conf` if it is not a symlink.  
However, **I don’t think** NetworkManager supports native DoH/DoT, but it can use the third party systemd-resolved to support DoT.

You do not want systemd-resolved, try to setup `unbound` for DoT and learn how to config it.

---

<div class="post-metadata">

**Author:** ![android](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/android/32/82854_2.png) [@android](https://forum.endeavouros.com/u/android)\
**Post date:** [April 23, 2024, 2:45pm UTC](https://forum.endeavouros.com/t/can-someone-help-me-setup-dns-over-https-dns-over-tls/54274/6 "2024-04-23T14:45:40Z")

</div>

> [@Zesko](#):
>
> You do not want systemd-resolved, try to setup `unbound` for DoT and learn how to config it.

I came to the same conclusion. Today I spent 5 hours trying to get one of these [DNS servers](https://wiki.archlinux.org/title/Domain_name_resolution#DNS_servers) working but without any success. I tried `DNS-over-HTTPS`, `Stubby` & `Unbound`… but I am just way over my head in this and network stuff is definitely not my area of expertise…

I was hoping there would be a basic tutorial with every step explained.

Anyways thanks for the all the help but I shelve this project for now.

---

<div class="post-metadata">

**Author:** ![firefly](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/firefly/32/67235_2.png) [@firefly](https://forum.endeavouros.com/u/firefly)\
**Post date:** [April 23, 2024, 3:01pm UTC](https://forum.endeavouros.com/t/can-someone-help-me-setup-dns-over-https-dns-over-tls/54274/7 "2024-04-23T15:01:11Z")

</div>

You can always enable DoH on a browser level - very easy to do and definitely better than nothing.

---

<div class="post-metadata">

**Author:** ![android](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/android/32/82854_2.png) [@android](https://forum.endeavouros.com/u/android)\
**Post date:** [April 23, 2024, 3:21pm UTC](https://forum.endeavouros.com/t/can-someone-help-me-setup-dns-over-https-dns-over-tls/54274/8 "2024-04-23T15:21:46Z")

</div>

Thanks, I just did that!  
Like you said: better than nothing 🙈.

---

<div class="post-metadata">

**Author:** ![vazicebon](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/vazicebon/32/81098_2.png) [@vazicebon](https://forum.endeavouros.com/u/vazicebon)\
**Post date:** [April 23, 2024, 3:28pm UTC](https://forum.endeavouros.com/t/can-someone-help-me-setup-dns-over-https-dns-over-tls/54274/9 "2024-04-23T15:28:27Z")

</div>

I would have tried cloudflared with a mullvad server.

[https://wiki.archlinux.org/title/Cloudflared#Endpoints](https://wiki.archlinux.org/title/Cloudflared#Endpoints)

> **[DNS over HTTPS and DNS over TLS](https://mullvad.net/en/help/dns-over-https-and-dns-over-tls#server-locations)**
>
> Our public DNS service

---

<div class="post-metadata">

**Author:** ![android](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/android/32/82854_2.png) [@android](https://forum.endeavouros.com/u/android)\
**Post date:** [April 23, 2024, 4:06pm UTC](https://forum.endeavouros.com/t/can-someone-help-me-setup-dns-over-https-dns-over-tls/54274/10 "2024-04-23T16:06:57Z")

</div>

EDIT: I edited the post to showcase my working `cloudflared.service` file.

[https://wiki.archlinux.org/title/Cloudflared#Usage](https://wiki.archlinux.org/title/Cloudflared#Usage)

`1)`

 ![image](https://forum.endeavouros.com/uploads/default/original/3X/3/2/3226693c66050668012b1fcae5a292aeb1ce37d6.png)  
`2)`

```auto
───────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: /etc/systemd/system/cloudflared.service
───────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1 │ [Unit]
   2 │ Description=DNS over HTTPS proxy client
   3 │ Wants=network-online.target nss-lookup.target
   4 │ Before=nss-lookup.target
   5 │ 
   6 │ [Service]
   7 │ AmbientCapabilities=CAP_NET_BIND_SERVICE
   8 │ CapabilityBoundingSet=CAP_NET_BIND_SERVICE
   9 │ DynamicUser=yes
  10 │ ExecStart=/usr/bin/cloudflared proxy-dns --upstream https://dns.mullvad.net/dns-query
  11 │ 
  12 │ [Install]
  13 │ WantedBy=multi-user.target
───────┴──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

```

`3)` start `cloudflared.service` or reboot

---

<div class="post-metadata">

**Author:** ![vazicebon](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/vazicebon/32/81098_2.png) [@vazicebon](https://forum.endeavouros.com/u/vazicebon)\
**Post date:** [April 23, 2024, 4:34pm UTC](https://forum.endeavouros.com/t/can-someone-help-me-setup-dns-over-https-dns-over-tls/54274/11 "2024-04-23T16:34:21Z")

</div>

I can’t help you much, because I don’t want to touch my config, I’m running Unbound as my local DNS server.

---

<div class="post-metadata">

**Author:** ![Zesko](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/zesko/32/77795_2.png) [@Zesko](https://forum.endeavouros.com/u/Zesko)\
**Post date:** [April 23, 2024, 4:52pm UTC](https://forum.endeavouros.com/t/can-someone-help-me-setup-dns-over-https-dns-over-tls/54274/12 "2024-04-23T16:52:55Z")

</div>

> [@android](#):
>
> I think I am fundamentally missing something else with all those DNS servers / configurations.

> [@android](#):
>
> ```auto
> ... --address https://de-fra-dns-001.mullvad.net/dns-query --port 53
> 
> ```

Where is a DNS resolver to resolve this domain name `de-fra-dns-001.mullvad.net` ?  
Try changing this URL to a static IP address with a specific port.

---

<div class="post-metadata">

**Author:** ![android](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/android/32/82854_2.png) [@android](https://forum.endeavouros.com/u/android)\
**Post date:** [April 25, 2024, 12:13pm UTC](https://forum.endeavouros.com/t/can-someone-help-me-setup-dns-over-https-dns-over-tls/54274/13 "2024-04-25T12:13:54Z")

</div>

Thank you for pointing me in the right direction!

I made a mistake in my `/etc/systemd/system/cloudflared.service` file 😐.

After re-reading [https://wiki.archlinux.org/title/Cloudflared#Endpoints](https://wiki.archlinux.org/title/Cloudflared#Endpoints) again:

`cloudflared proxy-dns --upstream https://dns.mullvad.net/dns-query` works for me.

I was not using the `--upstream` but the `--address` option.

 ![image](https://forum.endeavouros.com/uploads/default/original/3X/a/a/aa0c73f3c751cb4facdba06ab85c4463b7421969.png)

* * *

Thanks again for all the help that I got from everyone!

---

<div class="post-metadata">

**Author:** ![system](https://forum.endeavouros.com/uploads/default/original/2X/9/9ea52f9fd5ef8e609e593c362d61a36295f48be8.png) [@system](https://forum.endeavouros.com/u/system)\
**Post date:** [April 27, 2024, 12:14pm UTC](https://forum.endeavouros.com/t/can-someone-help-me-setup-dns-over-https-dns-over-tls/54274/14 "2024-04-27T12:14:03Z")

</div>

Closed on April 27, 2024, 12:14pm UTC

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
