How to specify a port number for DNS servers with netplan

Ubuntu 20.04 with netplan throws malformed address error when cloudflare dns over tls (1.1.1.1:853) is used. Netplan only excepts 1.1.1.1.

Is there a way to configure DoT or DoH with netplan?

enter image description here

2 Answers

As indicated by the error message, netplan does not support specifying a non-default port for DNS servers; it will only use port 53. I see that systemd-resolved does support non-default ports, so this is a valid feature request for netplan, best reported at .

I have personally never heard before of providers offering DNSSEC on an alternate port. You might check with your provider if they have a DNSSEC endpoint running on port 53 but a different IP address.

1

As @slangasek pointed out configuring port 853 for an dns entry with netplan is not supported./etc/systemd/resolved.conf is the current way in ubuntu.

# See resolved.conf(5) for details
[Resolve]
DNS=1.1.1.1
FallbackDNS=
#Domains=
LLMNR=no
MulticastDNS=no
DNSSEC=yes
DNSOverTLS=yes
#Cache=yes
DNSStubListener=no

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like