Skip to content
Menu
vernon.wenberg.net
vernon.wenberg.net
May 21, 2020March 2, 2022

Fix DNS after upgrading to Ubuntu Server 20.04

The way DNS is configured in Ubuntu has become overly complicated in the last few versions. Instead
of configuring /etc/network/interfaces, it is now configured using Netplan. But sometimes that
doesn’t even work because DNS is ultimately controlled by systemd-resolv. systemd-resolv
generates /etc/resolv.conf and the default stub DNS uses a local resolver to resolve DNS
hostnames. For some reason, after upgrading to Ubuntu 20.04 from 18.04, the local resolver was not
started or installed. To fix this, you can’t just edit /etc/resolv.conf, you must add your custom
DNS servers in /etc/resolvconf/resolv.conf.d/head shown in the image below.

Restart the system and your custom DNS servers should stick.

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to print (Opens in new window) Print
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on LinkedIn (Opens in new window) LinkedIn

Like this:

Like Loading...

Related

Disclaimer

These posts are notes for me. These are not guides and you should not use these instructions as step-by-step instructions without knowing what they do.

Recent Posts

  • HPE Aruba-CX Notes
  • Docker Reference
  • Useful Commands for Windows Subsystem for Linux
  • FortiManager Local-In Policy
  • Mount Google Drive in Linux using rclone

Mastodon

  1. Loading Mastodon feed...

©2025 vernon.wenberg.net | Powered by WordPress and Superb Themes!
%d