i am not sure what the problem is but it seems to be fairly common that it will not connect to any of the repositories and i think it may be a dns issue but am not sure how to solve it
You did not mention if you are able to connect to any other host.
or which OS your are using, but if you are using Debian can you ping
ftp.debian.org or security.debian.org ?
A quick&dirty way to get DNS working: put a public Google nameserver by hand into /etc/resolv.conf by something like this command:
echo "nameserver 188.8.131.52" > /etc/resolv.conf