**This is an old revision of the document!**
Table of Contents
Using systemd-resolved
Configure NetworkManager
Edit the /etc/NetworkManager/NetworkManager.conf file, and set the following entry in the [main] section:
dns=systemd-resolved
Reload the NetworkManager service:
# systemctl reload NetworkManager
Force adjusting of /etc/resolv.conf
netconfig update -f
Verification steps
Verify that the nameserver entry in the /etc/resolv.conf file refers to 127.0.0.53:
# cat /etc/resolv.conf nameserver 127.0.0.53
Verify that the systemd-resolved service listens on port 53 on the local IP address 127.0.0.53:
# netstat -tulpn | grep "127.0.0.53:53" tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 1050/systemd-resolv udp 0 0 127.0.0.53:53 0.0.0.0:* 1050/systemd-resolv
1. Add DNS Entries
2. Troubleshooting
Some domain cannot be resolved (e.g., google.com but bing.com works). After updating system, may be relink the resolve file:
sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
Check which route the DNS query goes:
ip route get 1.1.1.1 dig google.com @1.1.1.1