Problem - Synaptic/Update Manager - "Could not download all repository indexes"

I am a fairly new linux user and have just installed Ubuntu.       Originally, I could ping but not access the web through Firefox.     I solved this problem by disabling ipv6 in Firefox and I can now ping and browse the net but I cannot use wget or download via Synaptic.     wget displays the following type of message:     ale@Dym4300:~$ wget       ---13:43:44--       => `index.html.2'       Resolving       Connecting to||:80...       Synaptic/Update Manager display the following error message after trying to download for a few minutes:       "Could not download all repository indexes"       Any help or advice will be gratefully received.       Thanks       Phil

Router issue?

I just installed Ubuntu for the first time and had this same problem. apt-get couldn't connect to because it was resolving the name to address I manually ran wget and had the same problem. However, ping worked fine, and after the ping wget would magically work. Based on the comment about Firefox working when you disable IPv6, I tried running wget on a new address (which initially resolved to with the -4 option to make it use only IPv4 addresses. Voila! It worked fine. So it looks like programs are resolving names into IPv6 addresses and then using them as IPv4 addresses or something equally strange (and broken).

So there's some extra info... but I don't know how to fix it, either. :-(

UPDATE: It seems to be a problem with my modem/router. I was using it as my DNS (nameserver so that it would forward requests to the (dynamically assigned) nameservers from my ISP. I pointed my web browser to the router config page and looked up its current nameservers and put them into my /etc/resolv.conf. Then things seemed to work fine (no more This is a plausible solution for me because I run my own DHCP server and DNS proxy (using dnsmasq) instead of using the router (I was only using the router's DHCP/DNS while I set up my server). If you are using the router's DHCP and don't want to set up your own, then check if you can configure the nameserver information your router passes out in DHCP responses, or override those settings on your local machines (should be a dhcp client option, or resolv.conf permission change?). Maybe check for a router firmware upgrade that will fix the problem.