Skip to content

Instantly share code, notes, and snippets.

@yordanoweb
Last active July 21, 2024 19:38
Show Gist options
  • Save yordanoweb/ad6bdbd2738b208841cba1cfcf34f65e to your computer and use it in GitHub Desktop.
Save yordanoweb/ad6bdbd2738b208841cba1cfcf34f65e to your computer and use it in GitHub Desktop.
Get full control of resolv.conf

Get full control of resolv.conf

Edit NetworkManager.conf

Open /etc/NetworkManager/NetworkManager.conf and add:

[main]
dns=none

Restart NetworkManager

sudo systemctl restart NetworkManager.service

Now, destroy as you wish /etc/resolv.conf

Add any server that you want to /etc/resolv.conf. For example, I use 127.0.0.1 because I have installed dnscrypt-proxy.

nameserver 127.0.0.1

If nothing works as expected

# /etc/resolv.conf.head
nameserver custom.dns.ip.addr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment