How do I set OpenDNS DNS server under Ubuntu Linux desktop operating systems by editing configuration files?
There are two types of configurations under Ubuntu Linux operating systems as per your IP configuration.
Static IP Configuration
If your Ubuntu box is configured to use static IP via /etc/network/interfaces edit /etc/resolv.conf file and add opendns dns server names, run (open a terminal and type the commands):
sudo vi /etc/resolv.conf
Edit / add nameserver settings as follows
nameserver 208.67.222.222 nameserver 208.67.220.220
Save and close the file.
DHCP IP Configuration
If you are getting IP address via DHCP edit /etc/dhcp3/dhclient.conf, run (open a terminal and type the commands):
sudo vi /etc/dhcp3/dhclient.conf
Add the following option config section.
option domain-name-servers 208.67.222.222,208.67.220.220
Save and close the file. Restart the computer or obtain dhcp IP again by typing the following command:
dhclient
OR
dhclient eth0