I tweaked my system by installing ftp server and a dns server. I think in the process I messed up resolv.conf and the hosts file.
Now I want to restore it but am not able to do so.
I am using ubuntu 14.04 x86_64.
Here is a screenshot that might help: