Linux

107
Posts
1
Members
0
Followers
Profile picture of martin
Linux · ·
Last updated Feb 16, 2022 - 5:51 PM Visible also to unregistered users
# Stop NetworkManager from overwriting resolv.conf When using wireguard on ubuntu it needs to have `openresolv` installed instead of `resolvconf`. With this it can reset `/etc/resolv.conf` after connecting successfully. We need to tell NetworkManager to also use openresolvs’ resolvconf, so that it does not overwrite the `/etc/resolv.conf` on any network changes (e.g. WLAN reconnect). ``` # Install openresolv apt install openresolv # Create file /etc/NetworkManager/conf.d/rc-manager.conf echo -e "[main]\nrc-manager=resolvconf" | tee /etc/NetworkManager/conf.d/rc-manager.conf # Restart NetworkManager service NetworkManager restart ``` Source: * [Broken DNS resolution](https://wiki.archlinux.org/title/WireGuard#Troubleshooting) which links to: [Use openresolv](https://wiki.archlinux.org/title/NetworkManager#Use_openresolv)