unable to connect to internet from terminal on ubuntu 12.04

Posted on


I don’t get whats the problem but when i try to run the following command :

sudo apt-get update

I was getting an output of sort…

0% [Connecting to us.archive.ubuntu.com (] [Connecting to security.ubuntu.com (] 
0% [Connecting to us.archive.ubuntu.com (] [Connecting to security.ubuntu.com (] 
0% [Connecting to us.archive.ubuntu.com (] [Connecting to security.ubuntu.com (] 
0% [Connecting to us.archive.ubuntu.com (] [Connecting to security.ubuntu.com (] 

and so on… but unable to download anything… :(…

I updated my resolv.conf file and is as follows:

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)

the routing table looks like:

Kernel IP routing table                                                                                         
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface                                   UG    0      0        0 eth0                                U     1000   0        0 eth0                              U     1      0        0 eth0 

My wired connection configuration is like this:

eth0  Link encap:Ethernet  HWaddr e8:9a:8f:0b:25:57                                                         
      inet addr:  Bcast:  Mask:                                     
      inet6 addr: fe80::ea9a:8fff:fe0b:2557/64 Scope:Link                                                   
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1                                                    
      RX packets:201591 errors:0 dropped:0 overruns:0 frame:0                                               
      TX packets:54761 errors:0 dropped:0 overruns:0 carrier:1                                              
      collisions:0 txqueuelen:1000                                                                          
      RX bytes:53827641 (53.8 MB)  TX bytes:7677456 (7.6 MB)                                                

And our institute uses a proxy server… when i try to ping that server it was pinging these servers but not the external servers…like security.ubuntu.com or some other site… I can access internet from my browser, but the software center is unable to download anything.

I have set the system-proxy also..
Plz help….


The IP address starting with “169” in your routing table is an APIPA (Auto Private IP Address) and it should raise a red flag every time you see it. It means that your computer gave up trying to contact a DHCP server for a legitimate IP address. In a good LAN setup, I’ve found this is usually due to an unplugged patch cable. Also make sure your computer has the correct address for your DHCP server.

However “172” is a valid private IP address for your eth0.

Important: Do not edit your resolv.conf file!

Make the changes for dns-search, dns-nameservers, static IP address, subnet mask, etc. in the
/etc/network/interfaces file. To keep things simple, reboot after you make your changes or learn how to use ifdown and ifup

Your best bet is to search Google for your Ubuntu version and keywords such as “editing resolv.conf,” “adding nameservers,” and so forth.

Leave a Reply

Your email address will not be published. Required fields are marked *