I'm connecting to different WLANs all the time, and at boot time my computer also connects through a VPN-tunnel. The problem is that the DNS-server address received via DHCP often times don't allow clients from the IP-range I'm assigned to by my VPN-host. I take care of this by entering the Google public DNS:es into resolv.conf, but it's a pain to do that each time I reboot my computer.
Could this be fixed in a better way? Could I assign the DNS-server to use in the config of OpenVPN? I was thinking about denying write access for all users to the resolv.conf, but I'm worried that will cause other problems. Surely there must be a way to do this?