# How to DNSOverTLS=yes on /etc/systemd/resolved.conf

**URL:** <https://forum.virtualmin.com/t/how-to-dnsovertls-yes-on-etc-systemd-resolved-conf/128904>\
**Category:** General Discussion\
**Created:** [September 1, 2024, 11:01pm UTC](https://forum.virtualmin.com/t/how-to-dnsovertls-yes-on-etc-systemd-resolved-conf/128904 "2024-09-01T23:01:54Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![africabloe](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/africabloe/32/12088_2.png) [@africabloe](https://forum.virtualmin.com/u/africabloe)\
**Post date:** [September 1, 2024, 11:01pm UTC](https://forum.virtualmin.com/t/how-to-dnsovertls-yes-on-etc-systemd-resolved-conf/128904/1 "2024-09-01T23:01:54Z")

</div>

Ubuntu Server **22.04.4** | Webmin **2.202** | Usermin **2.102** | Virtualmin **7.20.2** | Theme **21.20.7** | Perl **5.034000** | Apache **2.4.52** | Python **3.10.12** | BIND **9.18** | MariaDB **10.6.18** | PHP **8.3.11** | Postfix **3.6.4** | Dovecot **2.3.16** | SpamAssassin **3.4.6** | CSF **14.21** | ClamAV **0.103.11** | OpenSSH **8.9** | OpenSSL **3.0.2** | Certbot **1.21.0** | Logrotate **3.19.0** | NTP **1:4.2.8p15** | Lynis **3.1.1**  
**Package updates** [All installed packages are up to date]

**Name-based Virtual Hosts share 3 IP addresses (2x IPv4 + 1x IPV6)**

 ![vps.domainA.com server](https://cdn.forum.virtualmin.com/uploads/default/original/3X/7/6/76c17fc0d84caf63f332e550745c7a6be65714e7.png)

The domains and the server have passed all the following tests with absolute success.

```auto
hstspreload.org, intodns.com, dnsviz.net, dnssec-analyzer.verisignlabs.com
zonemaster.net, en.internet.nl, www.mail-tester.com, www.hardenize.com
www.mailhardener.com/tools/, easydmarc.com/tools/, www.ssllabs.com

```

All registry entries (dns records) work flawlessly for all services. Mail, Databases, Firewall, Anti-Spam, Wordpress, SSH, etc. The communication of the server with the outside world works seamlessly, without any error anywhere.

```auto
mta-sts, mx, spf, dmarc, dkim, bimi, tlsa, dnssec, dane, rdns

```

I try to enable DNSOverTLS=yes option in resolved.conf document but every time after restarting systemd-resolved.service curl, dig, delv don’t bring results to terminal queries…

I also tried DNSOverTLS=opportunistic but again to no avail.  
Tried enabling DNS=ip\_address#hostname as well but no luck with that either.

Could the problem be that the DNS of my server works on a Name-based basis because I have to divide the IPs into 3 domains and all the rdns look at the hostname?

Does anyone know how to enable DNSOverTLS?

---

<div class="post-metadata">

**Author:** ![Joe](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/joe/32/9_2.png) [@Joe](https://forum.virtualmin.com/u/Joe)\
**Post date:** [September 1, 2024, 11:25pm UTC](https://forum.virtualmin.com/t/how-to-dnsovertls-yes-on-etc-systemd-resolved-conf/128904/2 "2024-09-01T23:25:33Z")

</div>

Why do you believe the DNS servers you’re using offer DNS over TLS? I mean, do they say they do? Most do not, a small few do. ISPs and hosting providers tend to be in the “do not” category. Google is among the few that offers it for their DNS resolvers.

> **[DNS-over-TLS  |  Public DNS  |  Google for Developers](https://developers.google.com/speed/public-dns/docs/dns-over-tls)**

When you enable DNS over TLS in a browser, it uses whatever DNS server they use, it no longer uses your system-configured resolver.

---

<div class="post-metadata">

**Author:** ![africabloe](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/africabloe/32/12088_2.png) [@africabloe](https://forum.virtualmin.com/u/africabloe)\
**Post date:** [September 2, 2024, 12:20am UTC](https://forum.virtualmin.com/t/how-to-dnsovertls-yes-on-etc-systemd-resolved-conf/128904/3 "2024-09-02T00:20:05Z")

</div>

Thank you for the response Joe 🙂

My hosting provider is Contabo… They do not offer DNS over TLS. Right.  
I thought that since I manage the DNS records myself, it would be something simple and possible to be able to do the DNS resolution on my server - through the IPs I manage…

But it seems I misunderstood…  
Then what is the reason for DNSOverTLS to exist in systemd/resolved.conf ?

And why doesn’t terminal resolution work even with Google and Cloudflare DNS servers?

> DNS=9.9.9.9 1.0.0.1 8.8.8.8  
> FallbackDNS=149.112.112.112 1.1.1.1 8.8.4.4  
> DNSOverTLS=yes  
> DNSSEC=yes

Is it because I have enabled DNSSEC?  
The reason I have it enabled is for spam control via postfix.

---

<div class="post-metadata">

**Author:** ![lawk](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/l/dbc845/32.png) [@lawk](https://forum.virtualmin.com/u/lawk)\
**Post date:** [September 2, 2024, 12:25am UTC](https://forum.virtualmin.com/t/how-to-dnsovertls-yes-on-etc-systemd-resolved-conf/128904/4 "2024-09-02T00:25:31Z")

</div>

You can enable DoT or DoH for BIND 9.18, so on Ubuntu newish and Debian newish. It does not work natively on RHEL9 derivatives and as of now it will not be backported.

Instructions here for example, but in german, but shows config parameters:

[Bind 9.18 mit DoH und DoT – -=Kernel-Error=-](https://www.kernel-error.de/2022/03/18/bind-9-18-mit-doh-und-dot/)

[BIND 9 Administrator Reference Manual — BIND 9 9.21.1-dev documentation](https://bind9.readthedocs.io/en/latest/index.html)

but the standard between resolvers and authorative is not used yet.

[RFC 9539 - Unilateral Opportunistic Deployment of Encrypted Recursive-to-Authoritative DNS (ietf.org)](https://datatracker.ietf.org/doc/rfc9539/)

if you enable it then in the future maybe other nameservers will talk to yours with dot/doh.

as of right now you can enable it clientwise from home easily windows and most public dns services support it.

---

<div class="post-metadata">

**Author:** ![Joe](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/joe/32/9_2.png) [@Joe](https://forum.virtualmin.com/u/Joe)\
**Post date:** [September 2, 2024, 12:28am UTC](https://forum.virtualmin.com/t/how-to-dnsovertls-yes-on-etc-systemd-resolved-conf/128904/5 "2024-09-02T00:28:03Z")

</div>

> [@africabloe](#):
>
> Then what is the reason for DNSOverTLS to exist in systemd/resolved.conf ?

It is to use DNS over TLS for local name resolution when communicating with the DNS server(s) you use. It is a client-side service.

systemd-resolved is a caching name resolver. It has nothing to do with serving DNS for your domains or Virtualmin (the DNS server in a Virtualmin system is BIND, if you’re hosting DNS locally). systemd-resolved is the DNS resolver your local clients use to lookup names on the internet; for e.g. system updates, web requests with curl, etc.

> [@africabloe](#):
>
> Is it because I have enabled DNSSEC?

DNSSEC has nothing to do with any of this.

> [@africabloe](#):
>
> The reason I have it enabled is for spam control via postfix.

DNSSEC has nothing to do with spam control, either. (DNSSEC is basically useless. We support it, but I don’t use it, and I see no reason to recommend it.)

---

<div class="post-metadata">

**Author:** ![africabloe](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/africabloe/32/12088_2.png) [@africabloe](https://forum.virtualmin.com/u/africabloe)\
**Post date:** [September 2, 2024, 12:35am UTC](https://forum.virtualmin.com/t/how-to-dnsovertls-yes-on-etc-systemd-resolved-conf/128904/6 "2024-09-02T00:35:42Z")

</div>

Thanks for the reply mate  
I will study the links you sent me extensively.  
My understanding so far is that I know nothing about DNS

---

<div class="post-metadata">

**Author:** ![africabloe](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/africabloe/32/12088_2.png) [@africabloe](https://forum.virtualmin.com/u/africabloe)\
**Post date:** [September 2, 2024, 12:45am UTC](https://forum.virtualmin.com/t/how-to-dnsovertls-yes-on-etc-systemd-resolved-conf/128904/7 "2024-09-02T00:45:09Z")

</div>

> [@Joe](#):
>
> It is to use DNS over TLS for local name resolution when communicating with the DNS server(s) you use. It is a client-side service.

Yes. Like this it works. True.

> [@Joe](#):
>
> DNSSEC has nothing to do with spam control, either. (DNSSEC is basically useless. We support it, but I don’t use it, and I see no reason to recommend it.)

Yes, wrong, not for spam control but for smtp security. OK.

> smtp\_dns\_support\_level = dnssec  
> smtp\_tls\_security\_level = dane

I do not agree for DNSSEC. It is important.

1. **Authentication:** DNSSEC provides authentication and data integrity of DNS responses, ensuring that the data received from a DNS server is legitimate and has not been tampered with.
2. **Security:** DNSSEC helps protect against various DNS-based attacks, such as DNS spoofing, cache poisoning, and man-in-the-middle attacks.
3. **Trust:** DNSSEC builds trust in the DNS system, as it ensures that the domain name system is secured and verified, and that users are communicating with the intended server.
4. **Privacy:** DNSSEC provides privacy protection by preventing attackers from seeing the domain names being queried by users.

---

<div class="post-metadata">

**Author:** ![Joe](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/joe/32/9_2.png) [@Joe](https://forum.virtualmin.com/u/Joe)\
**Post date:** [September 2, 2024, 1:45am UTC](https://forum.virtualmin.com/t/how-to-dnsovertls-yes-on-etc-systemd-resolved-conf/128904/8 "2024-09-02T01:45:54Z")

</div>

> [@africabloe](#):
>
> Yes, wrong, not for spam control but for smtp security. OK.

It doesn’t provide any useful security feature to SMTP that STARTTLS doesn’t provide more easily.

> [@africabloe](#):
>
> I do not agree for DNSSEC. It is important.

OK, we’ll agree to disagree. But, I know what all these things do, so… 🤷‍♂️

TLS provides an easier method of providing everything you would get from DNSSEC. There is no reason to use DNSSEC today.

---

<div class="post-metadata">

**Author:** ![shoulders](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/shoulders/32/10086_2.png) [@shoulders](https://forum.virtualmin.com/u/shoulders)\
**Post date:** [September 2, 2024, 7:06am UTC](https://forum.virtualmin.com/t/how-to-dnsovertls-yes-on-etc-systemd-resolved-conf/128904/9 "2024-09-02T07:06:31Z")

</div>

**BIND server**

> <https://github.com/webmin/webmin/issues/2224>
>
> | SYSTEM INFORMATION||
> |----------------------|---------------------------|
> |… OS type and version | Ubuntu Linux 22.04.4 |
> | Webmin version | 2.111 |
> | Usermin version | 2.010 |
> | Virtualmin version | 7.20.1   |
> | Theme version | 21.10 |
> | Package updates | All installed packages are up to date |
> | BIND version | 9.18.28 |
> 
> \### the feature
> 
> Can you add support for DoT into Webmin GUI and SSL handling.
> 
> Bind9 as of version 9.18.28 it is now officially supports DoT along with DoH, might of been earlier but it is there now.
> 
> Using the hostname SSL or the default website SSL certificates would do the trick but does this then require virtualmin.
> 
> FirewallD already has this port open in its default set of ports.
> 
> \### Links
> 
> \- https://www.isc.org/blogs/doh-talkdns/ - some instructions I found
> \- https://bind9.readthedocs.io/en/v9.18.28/notes.html#id84 - Release notes showing support
> \- https://forum.virtualmin.com/t/dns-over-tls-dot/122805

**Ubuntu as a client** , see the section `Enable DNS over TLS (DoT)` in:

[https://quantumwarp.com/kb/articles/34-web-server/1016-my-virtualmin-notes](https://quantumwarp.com/kb/articles/34-web-server/1016-my-virtualmin-notes)

---

<div class="post-metadata">

**Author:** ![system](https://cdn.forum.virtualmin.com/uploads/default/original/2X/c/cd96d761e326db4b2bef94886a639109bd7a8e76.svg) [@system](https://forum.virtualmin.com/u/system)\
**Post date:** [November 1, 2024, 7:07am UTC](https://forum.virtualmin.com/t/how-to-dnsovertls-yes-on-etc-systemd-resolved-conf/128904/10 "2024-11-01T07:07:15Z")

</div>

Closed on November 1, 2024, 7:07am UTC

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