Ubuntu 14.04 wired connection detected but no internet access

12

7

I have no wired connection internet access on ubuntu 14.04 even though it is detected, my computer connected to the same router has.

$ ifconfig
eth0      Link encap:Ethernet  HWaddr 4c:72:b9:7e:b5:61  
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::4e72:b9ff:fe7e:b561/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:93 errors:0 dropped:0 overruns:0 frame:0
          TX packets:705 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:18292 (18.2 KB)  TX bytes:76277 (76.2 KB)
          Interrupt:17 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:701 errors:0 dropped:0 overruns:0 frame:0
          TX packets:701 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:54442 (54.4 KB)  TX bytes:54442 (54.4 KB)

wlan0     Link encap:Ethernet  HWaddr 08:3e:8e:5f:56:1e  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

user324935

Posted 2014-05-19T16:10:07.287

Reputation: 123

what happens if you ping your router ping -c3 192.168.1.1? Or Google's DNS ping -c3 8.8.8.8? – MariusMatutiae – 2014-05-19T16:21:23.133

3 packets sent, 3 received – user324935 – 2014-05-19T16:32:32.100

Answers

18

Good. Then you do not have DNS nameservers. Add these two lines to /etc/resolv.conf:

  nameserver 8.8.8.8
  nameserver 8.8.4.4

and it should work.

MariusMatutiae

Posted 2014-05-19T16:10:07.287

Reputation: 41 321

I used the IPs of opendns. But yes, your idea works! Thanks! – GTodorov – 2015-07-31T04:44:13.620

You are an expert dude. – Ashish Doneriya – 2017-05-15T15:53:37.540

That did work (it couldnt load videos on youtube) but after reboot is reset to: nameserver 8.8.8.8 nameserver 127.0.1.1 – user324935 – 2014-05-19T16:55:35.873

@user324935 It should work then, doesn't it? – MariusMatutiae – 2014-05-19T17:12:34.547

yes it is working properly now – user324935 – 2014-05-19T17:37:49.200