I had a server recently start having serious problems with connections of all types, at least when IPv6 was involved. I use IPv6 at home and ssh access took a significant amount of time to make a connection. Then when I tried to do apt-get update from the server it would fail with a message like this:
$ sudo apt-get update
[sudo] password for matt:
0% [Connecting to archive.ubuntu.com (2001:67c:1360:8c01::1a)] [Connecting to security.ubuntu.com (2001:67c:1360:8c01::1...
It would sit there and take forever without making any progress. Sadly, the Ubuntu docs aren’t much help unless you’re using Ubuntu 8.04 or older (I refuse to link to them which will only add to their credibility).
A workaround is to disable IPv6, but really you should take the time to fix the problem, since it is the way of the future. In my case I’m sure it’s routing related, and hopefully my server provider can resolve it. Until then, I do this: Continue reading