Page 1 of 3 123 LastLast
Results 1 to 10 of 29

Thread: Ubuntu can't reconnect to gmail after ISP restores access

  1. #1
    Join Date
    Aug 2010
    Beans
    238
    Distro
    Ubuntu Studio 20.04 Focal Fossa

    Ubuntu can't reconnect to gmail after ISP restores access

    Lately, my ISP has started making all Google sites inaccessible for a short time every afternoon (last 3-4 days now). I suspect some kind of DNS poisoning... access always comes back later in the afternoon.

    When access does come back, non-Linux machines can connect basically right away, but my Ubuntu machine (the primary one I use) seems to need a reboot, as if wrong DNS information gets stuck in the session and the reboot clears it so that the machine can get the correct IP address.

    I have not installed nscd, and IIUC the OS should not be persisting DNS cache information without that package. Every reference I can find online to clearing the DNS cache seems to depend on this package.

    The objective is just to get back in touch with my Gmail without having to reboot (since e.g. OSX doesn't require a reboot for the same). What should I do?

    Thanks,
    James

  2. #2
    Join Date
    Oct 2009
    Location
    Tucson, AZ
    Beans
    782
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Ubuntu can't reconnect to gmail after ISP restores access

    If your ISP is mucking about with your DNS servers, it might be better to use a different DNS server. Google provides free public DNS servers that anyone can use. Just right-click on the network icon, click Edit Connections, edit the connection you are using, switch to the IPv4 Settings tab, and change your DNS servers to 8.8.8.8 and 8.8.4.4. Changing them on the Windows machine and possibly your router might also clear up the problem with Google services going down for hours a day.

    For more information on the Google public DNS service, including how to configure it on other operating systems and devices, visit http://code.google.com/speed/public-dns/

    I personally find that they work better than my ISP's DNS servers.
    Last edited by PatchesTheCaveman; December 31st, 2010 at 07:53 AM.

  3. #3
    Join Date
    Aug 2010
    Beans
    238
    Distro
    Ubuntu Studio 20.04 Focal Fossa

    Re: Ubuntu can't reconnect to gmail after ISP restores access

    Here in mainland China, it would surprise me if I could use Google's DNS. I think Gmail gets through mainly because of tourists and business travelers who would be P.O.'d if they couldn't get their mail

    I may try OpenDNS. I used it back in the States. Yesterday when this happened, I changed the wireless connection to use OpenDNS, but it didn't make a difference (even after disconnecting and reconnecting). I'm not sure why that is. It's possible the ISP intercepted requests to OpenDNS, but I can't prove it. Or, the OS retained some bad DNS data and never asked OpenDNS for updates.

    To tell the difference between those cases, it would be nice to have some command to wipe out any cached IP's that the OS might be holding in memory.

    (Happened again just now... one reboot later, and it's all back to normal.)

    Thanks,
    James

  4. #4
    Join Date
    Oct 2009
    Location
    Tucson, AZ
    Beans
    782
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Ubuntu can't reconnect to gmail after ISP restores access

    Everything I can find tells me Linux doesn't cache DNS records unless you use the aforementioned nscd daemon. But obviously your computer is saving something that rebooting fixes, so that's weird.

    Is this a wired connection? If so, next time try
    Code:
    sudo ifdown eth0
    sudo ifup eth0
    That will reset your network connection. That might be enough.

    Also, if you want to figure out what's going on with your DNS, try running
    Code:
    dig mail.google.com
    when it's working and save it and run it again when it's not and see if there's a difference.

    Also, you can add IP address to hostname mappings in /etc/hosts if you think that might be helpful.

    ETA: Are you sure its not just the browser that's caching IPs? Try just restarting Firefox next time.
    Last edited by PatchesTheCaveman; December 31st, 2010 at 08:33 AM.

  5. #5
    Join Date
    Aug 2010
    Beans
    238
    Distro
    Ubuntu Studio 20.04 Focal Fossa

    Re: Ubuntu can't reconnect to gmail after ISP restores access

    Quote Originally Posted by PatchesTheCaveman View Post
    Everything I can find tells me Linux doesn't cache DNS records unless you use the aforementioned nscd daemon. But obviously your computer is saving something that rebooting fixes, so that's weird.
    I've got OpenDNS in place now, but the issue still occurs. (But, I don't have any confidence that the ISP/Great Firewall is not intercepting requests to known DNS IPs.)
    Is this a wired connection? If so, next time try
    Code:
    sudo ifdown eth0
    sudo ifup eth0
    That will reset your network connection. That might be enough.
    No, it's wireless. No problem from other machines (also connecting wirelessly).

    Also, if you want to figure out what's going on with your DNS, try running
    Code:
    dig mail.google.com
    when it's working and save it and run it again when it's not and see if there's a difference.
    Saved just now, will compare after I get the connection back up.

    Also, you can add IP address to hostname mappings in /etc/hosts if you think that might be helpful.
    Hadn't tried that yet. Hmm.

    ETA: Are you sure its not just the browser that's caching IPs? Try just restarting Firefox next time.
    No, it's any application. CheckGmail breaks, as does wanderlust (IMAP client). No problem with other sites (or apps like Skype). Disabling networking and re-enabling it again through the network manager doesn't make any difference.

    Next, I will try logging out and logging in again -- see if the bad information goes away with the session. But to do that, I lose what I'm typing now so... I'll be back

    James

  6. #6
    Join Date
    Aug 2010
    Beans
    238
    Distro
    Ubuntu Studio 20.04 Focal Fossa

    Re: Ubuntu can't reconnect to gmail after ISP restores access

    One reboot later and... we're back. Logout/login did nothing.

    Good and bad 'dig's look about the same.

    Maybe it isn't DNS after all. Could CheckGmail be doing something fishy? I could try running without it for a few days.

    James

    ('dig' with no contact -- 208.67.222.222 is an OpenDNS server)

    Code:
    ; <<>> DiG 9.7.0-P1 <<>> mail.google.com
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64260
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;mail.google.com.        IN    A
    
    ;; ANSWER SECTION:
    mail.google.com.    602506    IN    CNAME    googlemail.l.google.com.
    googlemail.l.google.com. 113    IN    A    74.125.71.18
    googlemail.l.google.com. 113    IN    A    74.125.71.17
    googlemail.l.google.com. 113    IN    A    74.125.71.19
    googlemail.l.google.com. 113    IN    A    74.125.71.83
    
    ;; Query time: 338 msec
    ;; SERVER: 208.67.222.222#53(208.67.222.222)
    ;; WHEN: Sun Jan  2 22:07:47 2011
    ;; MSG SIZE  rcvd: 124
    (dig with contact)

    Code:
    ; <<>> DiG 9.7.0-P1 <<>> mail.google.com
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26640
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 0, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;mail.google.com.        IN    A
    
    ;; ANSWER SECTION:
    mail.google.com.    601519    IN    CNAME    googlemail.l.google.com.
    googlemail.l.google.com. 29    IN    A    74.125.71.19
    googlemail.l.google.com. 29    IN    A    74.125.71.18
    googlemail.l.google.com. 29    IN    A    74.125.71.17
    googlemail.l.google.com. 29    IN    A    74.125.71.83
    
    ;; Query time: 357 msec
    ;; SERVER: 208.67.222.222#53(208.67.222.222)
    ;; WHEN: Sun Jan  2 22:24:15 2011
    ;; MSG SIZE  rcvd: 124

  7. #7
    Join Date
    Oct 2009
    Location
    Tucson, AZ
    Beans
    782
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Ubuntu can't reconnect to gmail after ISP restores access

    AFAICT IP blocks are how they do business, so it's unlikely DNS is involved here. Try running a traceroute when it isn't working for any of the computers, after it comes back and is just broken on your Ubuntu machine, and when it's working on the Ubuntu machine. (I don't know about Lucid but Maverick doesn't come with the traceroute command. Use mtr instead.) That might indicate where things are going wrong.

    As for why Gmail goes out intermittently: you might be hitting their keyword filter. They cut off the connection when they find a certain keyword in a TCP packet and then block the path between those two IPs for so many hours.

  8. #8
    Join Date
    Aug 2010
    Beans
    238
    Distro
    Ubuntu Studio 20.04 Focal Fossa

    Re: Ubuntu can't reconnect to gmail after ISP restores access

    Quote Originally Posted by PatchesTheCaveman View Post
    As for why Gmail goes out intermittently: you might be hitting their keyword filter. They cut off the connection when they find a certain keyword in a TCP packet and then block the path between those two IPs for so many hours.
    Now that makes sense.

    At the moment, Google is behaving fine, but another website that I frequent was "down" earlier this morning, quite possibly because of a keyword hit. But I tried it again just now and it's working again, no reboot. I don't know if it's a server glitch on their side or if I waited long enough, but that gives me a little more confidence anyway.

    Interesting, strange stuff

    James

  9. #9
    Join Date
    Oct 2009
    Location
    Tucson, AZ
    Beans
    782
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Ubuntu can't reconnect to gmail after ISP restores access

    Apparently you can also improve your situation by lowering your MTU (which reduces the maximum size of TCP packets), but Google failed me in finding a value that is effective for your purposes.

    To adjust it, run:
    Code:
    sudo ifconfig eth0 mtu <size>
    All mine seem to be 1500 as a frame of reference.

    Also, apparently using IPv6 is a good solution for those sites that support it. I know you can use normal Google search over IPv6 at http://ipv6.google.com/ but probably not Gmail. (That bastion of social networking they seem to hate also works by a similar construction.) All you have to do to get IPv6 connectivity working via Teredo tunneling is:
    Code:
    sudo apt-get install miredo
    If your router supports 6to4 or DD-WRT you can get that going for your whole network too.

  10. #10
    Join Date
    Jan 2009
    Location
    ::1
    Beans
    2,485

    Re: Ubuntu can't reconnect to gmail after ISP restores access

    Quote Originally Posted by dewdrop_world View Post
    Now that makes sense.

    At the moment, Google is behaving fine, but another website that I frequent was "down" earlier this morning, quite possibly because of a keyword hit. But I tried it again just now and it's working again, no reboot. I don't know if it's a server glitch on their side or if I waited long enough, but that gives me a little more confidence anyway.

    Interesting, strange stuff

    James
    Do you use https on your gmail connection all the time? Because, with a https-connection, a man-in-the-middle can't see any keywords ...
    Last edited by sanderj; January 3rd, 2011 at 08:19 AM.

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •