Slow ping on Debian

Today’s problem : my browser spends way too much time trying to connect to a website.

Ping is really slow when trying for Google :

$ time ping -c 4    

When trying for the IP, it’s much faster :

$ time ping -c 4    

Hmm… After googling that, it appears it’s the reverse DNS which is causing troubles. You can check that with :

$ time ping -n -c 4    

If it’s the case, you can try the suggestions from stackexchange. Personnally, I used Google’s nameserver in /etc/resolv.conf and it worked well. However, this file is rewritten if you use DHCP or Network Manager. If you use Gnome, it’s probably Network Manager, so pleas refer to Debianwiki for instructions. Otherwise, you can check you use DHCP with /etc/network/interfaces. Then you should have a line along :

$ iface eth0 inet dhcp   

If that’s the case, you need to edit /etc/dhcp/dhclient.conf and add :

$ supersede domain-name-servers,;  

Now, you are good to go.