I've decided systemd-resolved is irretrievably broken garbage and I'd like to replace. I've got my own local DNS server at I'd like. I'd also like to connect to a VPN with NetExtender that gives me a DNS server for a .local domain. I would like these two things to work together, what can I do?


2 Answers 2


The answer by Gannet is incorrect. If you want to use plain ifupdown like in earlier releases, without netplan or NetworkManager (e.g. on a server), with dhcp, you need to do this:

systemctl disable systemd-resolved.service
systemctl stop systemd-resolved.service

# check if resolv.conf is pointing to resolvconf
ls -la /etc/resolv.conf
# lrwxrwxrwx 1 root root 27 May  7 16:15 /etc/resolv.conf -> /run/resolvconf/resolv.conf
# if not, delete /etc/resolv.conf and symlink it like this: 
rm /etc/resolv.conf
ln -s /run/resolvconf/resolv.conf /etc/resolv.conf

# this will remove the resolved stub resolver entry from resolv.conf
resolvconf -d systemd-resolved

# fix dhclient scripts
chmod -x /etc/dhcp/dhclient-enter-hooks.d/resolved
chmod +x /etc/dhcp/dhclient-enter-hooks.d/resolvconf

# on my machine just chmod -x wasn't enough, I had to move the resolved script somewhere else
mv /etc/dhcp/dhclient-enter-hooks.d/resolved ~

# ifdown/ifup your interface to regenerate resolv.conf (or systemctl restart ifup@eth0)
ifdown eth0; ifup eth0

# check /etc/resolv.conf has the right settings

  • You, sir, are one of those unknown heroes that save the day.
    – ata
    Jun 8, 2021 at 2:17

You can always disable your systemd-resolved by

systemctl disable systemd-resolved.service

command. And run:

sudo rm /etc/resolv.conf && sudo ln -s /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf

to use /etc/resolv.conf config as it was earlier in previous ubuntu versions.

  • can it be removed via apt ? Jan 10, 2020 at 9:20

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.