Sometimes, when I am in some problematic network, I get DNS errors like this fatal: unable to access 'https://github.com/user/repo/': Could not resolve host: github.com
I add to the /etc/resolv.conf
one of this lines and it fix the problem:
nameserver 208.67.222.222
nameserver 208.67.220.220
But when I reboot this lines are erased too. How can I do it permanently?
I'm using Linux Mint 17.2
dhclient
is the program that performs DHCP to get an IP when connecting to a new network. It overwrites this file upon connecting with info from the DHCP server that answered. You can tell it to ignore what the network said and use what you want. Check here and use thesupersede
option. cyberciti.biz/faq/dhclient-etcresolvconf-hooks