You can edit your /etc/dhcp3/dhclient.conf, and add the VPN's DNS servers to the "prepend" line; this will ensure that the VPN's DNS servers are used everytime.
Originally Posted by baltazar3
From a terminal:
look for a line like
sudo nano /etc/dhcp3/dhclient.conf
and change it to read
#prepend domain-name-servers 127.0.0.1;
(Remember to remove the "#" commenting out the line in the beginning, or there will be no effect). Please change the server addresses in red to reflect the DNS servers you want. Multiple addresses are separated with spaces, and the line ends with a ";" semicolon.
prepend domain-name-servers 220.127.116.11 18.104.22.168;
To test, you can either restart, or relogin, or just give the command
sudo /etc/init.d/networking restart