resolv.conf not working properly with Ethernet in Ubuntu

you need to edit:

/etc/dhcp3/dhclient.conf

and prepend the dns severs to this. I think there is a commented out line for what you need.

resolv.conf is generated each time you boot.


actually resolv.conf is updated via ubuntu network manager upon getting a new lease from dhcp. your dhcp server ideally should give you a set of two nameservers to use in the local network. if you're behind a private broadband router it's likely that you accidentally disabled this dns feature there.

if you use the abovementioned dhclient.conf it is quite possible that your nameserver setting won't work as soon as you put your laptop in another network as not all recursive nameservers respond to all internet network ranges.