This is the default configuration with Vagrant precise32. It uses 127.0.1.1 on that line... are you sure this is wrong? It was working fine until I tried changing my hostname away from the default.
–
MarkMar 1 '14 at 2:42

Check /etc/resolv.conf to see if you have working name servers defined.

See if you can resolve any hostnames. Does nslookup google.com work ?
If not, your DNS lookup is failing, either due to configuration or a network or firewall problem (possibly at a point beyond what you have control of with your server).

In my experience, sudo will eventually ask you for you password, and grant you elevated privileges, after domain lookup times out.

Try manually adding the correct DNS name servers to /etc/resolv.conf.

In a pinch, you can use public servers. Here's what the file looks like using Google DNS servers: