Ubuntu: Creating resolv.conf file and connecting to internet

18 Mar

Yesterday I installed Ubuntu’s latest version for the first time in my life. It was no doubt a good experience. One thing that irritate me was, I was unable to connect to the internet. Thanks to our MIS department engineer who help me in getting out of the problem.

Here is what he did.

  • Create resolv.conf in /etc/ directory and place the following code.

nameserver 68.34.1.3

nameserver 68.34.1.4

These should be the first two line of the resolv.conf file.

Here first line contain the DNS sever IP and the second line is for alternate DNS.

Now in terminal write

sudo vim /etc/network/interfaces

This will open interfaces file

This file should contain the following code.

auto lo

iface lo inet loopback

iface etho0 inet static

address 66.45.5.55

netmask 45.45.5.55

network 45.45.4.44

broadcast 45.45.5.66

gateway 45.45.4.33

dns-nameserver 45.23.4.44, 45.23.4.64

dns-search example.org

auto eth0

Keep in mind that the address are not real, you will need to make sure all these address are correct in your case.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: