To prevent programs from overwriting /etc/resolv.conf you can also write-protect it by setting the immutable file attribute:
sudo chattr +i /etc/resolv.conf
From: https://wiki.archlinux.org/index.php/Domain_name_resolution#Overwriting_of_/etc/resolv.conf