• 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Setting DNS in Ubuntu
#1
As has been mentioned here on several occasions using Google's Open DNS servers is a much better solution than using the DNS server provided by your ISP.

This is how to change your DNS setting in Ubuntu to use said Google DNS server using gedit as a text editor(substitute your editor of choice where gedit is used):

In a terminal:

sudo gedit /etc/resolve.conf

In order to use the Google DNS you will need to add two entries into the file as such:

nameserver 8.8.8.8
nameserver 8.8.4.4

Save the file

Now the only problem is the next time you reboot or restart your networking interface(s) your DNS servers will be reset by the system to use the settings given by the DHCP server. Since this is counter-productive to the task at hand we will write-protect the resolve.conf file using the following command in terminal

sudo chattr +i /etc/resolv.conf

This gives your resolv.conf file an immutable file attribute preventing anything from modifying it.
In turn if you ever decide you would like to change DNS servers again remember to use the following command before attempting to edit the file again:

sudo chattr -i /etc/resolv.conf

:tux
[Image: icpn5k.jpg]
Trolls are the last thing you need to be concerned with.

VCD Wrote:// Forever more, count and reply, bitch.
  Reply


Messages In This Thread
Setting DNS in Ubuntu - by Pack3t SynAck3r - 14-09-2010, 05:44 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Ubuntu KDE? DerpyTurtle1337 1 7,184 11-11-2012, 02:10 PM
Last Post: Mark
  How to use Gnome instead of Unity in Ubuntu 11.04 Mark 1 8,115 13-10-2011, 06:01 PM
Last Post: Drumm
  Newly found skin for Ubuntu bigsharn 6 16,018 30-08-2011, 10:32 PM
Last Post: bigsharn
  HP's $99 / £60 TouchPad can run Ubuntu Mark 1 6,769 29-08-2011, 11:15 AM
Last Post: bigsharn
  Pulling / setting up a Microsoft Exchange account into Mozilla Thunderbird ? Mark 0 4,935 26-08-2011, 02:30 PM
Last Post: Mark

Forum Jump: