Skip to content

Instantly share code, notes, and snippets.

@vheidari
Last active April 1, 2020 23:36
Show Gist options
  • Save vheidari/bd0f8320ef5736439f4e3571a2fe7fbc to your computer and use it in GitHub Desktop.
Save vheidari/bd0f8320ef5736439f4e3571a2fe7fbc to your computer and use it in GitHub Desktop.
[ubuntu] : stop auto update name server in /etc/resolve.conf
[Command] :
1. sudo apt-get install dnsmasq
2. sudo apt-get install network-manenger
----------------------------------------------------------
[Solution[one]] :
1. nano /etc/dnsmasq.conf
2. add dns server ip in dnsmasq.conf :
-ex :server=ipaddress
server=8.8.8.8
server=8.1.8.1
3. service dnsmasq restart
-----------------------------------------------------------
[Solution[two]] :
1. nano /etc/NetworkManager/NetworkManager.conf
2. add this line blow [main] :
dns=none
3. service network-manager restart
-----------------------------------------------------------
[reference] :
https://unix.stackexchange.com/questions/128220/how-do-i-set-my-dns-when-resolv-conf-is-being-overwritten/163506#163506
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment