If you cannot ping any websites and cannot get updartes or upgrades, you might have a nameserver issue. GI just installed a fresh copy of Ubuntu Server 12.04 and this has been an issue since I installed it. I did not know what to do, but I check the /etc/resolv.conf file and it was totally blank. The format for this should be (as a sample)
search mysite.biz
nameserver ROUTER
nameserver OTHER ROUTER
You might need to tweak this a bit, I just wrote the same router twice. Save the file, exit and voila! Internet connection again!

as an update, this file is SUPPOSED to be blank and is only used for non-static machines. it is automatically overwritten a every restart. to permanently fix this, edit /etc/network/interfaces and add the line 'dns-nameservers 192.168.1.1' or whatever you router ip happens to be, and save the file. restart networking '/etc/init.d/networking restart' and voila! internet!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.