It is not difficult if you know what dns servers you want to use (up to three).
Code:
sudo cp /etc/resolv.conf /etc/resolv.conf.bak
sudo rm /etc/resolv.conf
With whatever text editor you like, create a new /etc/resolv.conf with up to three lines of
Code:
nameserver xxx.xxx.xxx.xxx
using the addresses of the nameservers you want to use, of course.
Then, and this is absolutely necessary,
Code:
sudo chattr -e /etc/resolv.conf
sudo chattr +i /etc/resolv.conf
This locks the file so it cannot be changed, even by the system. Now you should be using the dns servers you wish. If it doesn't seem to take, reboot and it should.
Note: to do ANYTHING with resolv.conf now you must first
Code:
sudo chattr -i /etc/resolv.conf
To return to the system resolv.conf simply change the attribute as above and move the backup file back.