7 Replies Latest reply: Aug 8, 2011 1:40 AM by MadMacs0
CW4PWR Level 1 Level 1 (0 points)

A few days ago, Safari started giving me the error message that it can't load http://www.google.com because the server www.google.com could not be found.  I searched and read about every forum dating back to 2007 on how to fix this and all of the solutions did not work on my computer.

 

I am running an iMac with Core 2 Duo 2.66 GHz. 

The problem existed in Safari, Chrome, FireFox and Opera

The problem existed after I created and logged in to a new account

Emptied all caches, histories

Reset cable modem and Time Capsel several times in various orders

Reset IP addresses and changed Proxies on and off

Tried various DNS configurations

Downloaded and installed MacKeeper and wiped out Caches and unneccessary files

Ran virus scaner and only found one infected file (an .exe that I copied over from my PC years ago - it wouldn't run anyway)

Purchased and installed Lion

 

Always the same result, I can go to any website except ones that had "www.google" in them.  Then I ran across the host lookup command in termanal so did an internet search for host files for Mac.  I found this site "http://www.mactricksandtips.com/2009/02/editing-a-macs-hosts-file.html" that explains where this file is located.  I found the file and opened it in texteditor and it contained the following.

 

##

# Host Database

#

# localhost is used to configure the loopback interface

# when the system is booting.  Do not change this entry.

##

127.0.0.1          localhost

255.255.255.255          broadcasthost

::1             localhost

fe80::1%lo0          localhost

 

91.224.160.26 google.com

91.224.160.26 google.co.uk

91.224.160.26 google.com.au

91.224.160.26 google.ca

91.224.160.26 google.us

91.224.160.26 www.google.com

91.224.160.26 www.google.co.uk

91.224.160.26 www.google.com.au

91.224.160.26 www.google.ca

91.224.160.26 www.google.us

 

When I would type in the IP address, I would get the error message above.  So now the plot thickens, I could not modify the file because it was locked.  I had to use the "Get Info" option in order to give myself permission to edit the file.  Then had to change permissions on the /ect director and the /private directory before I could edit and save the file without all the google llines.  I closed Safari and re-opend and Bam, Google was back. 

 

The Host file is a system file with only the wheel and system being able to edit it. 

 

So the big question - what modified the file and why just the google sites?


iMac, Mac OS X (10.7)
  • 1. Re: Can't find www.google.com
    rkaufmann87 Level 8 Level 8 (42,145 points)

    Sounds like an issue with your ISP. Have you reset your modem and if you are using a router have you reset it too?

  • 2. Re: Can't find www.google.com
    CW4PWR Level 1 Level 1 (0 points)

    Yes, I have reset the Comcast Cable modem and my Apple Time Capsul in various orders but that didn't work.  I did traceroutes to www.google.com and the results seemed normal.  I could ping www.google.com as well and recieved responses in the 30ms range (no delays). I was thinking that my routing could be going astray and tried to reset my IP address through Comcast but that wouldn't make sense becuase other computers (another iMac, a PC laptop, 2 iPhones, an iPad and an iPod) on the same network could access Google with no issues.

     

    From my end, it seemed that www.google.com was being redirected.  I could type in a real Google address and it would come up but it would not show search results because it would route to a www.google.com address and then re-direct to the bogus 91.224.160.26 address.  I spent some time in a chat with the Comcast techs but they insisted it was on my iMac and it was out of their scope of support. 

     

    My issue is who/what had permission to change the host file?  The file was updated on 30 Jul 11 just after midnight.  I was asleep at the time.  Also, I don't have a butler so rule that one out...

  • 3. Re: Can't find www.google.com
    rkaufmann87 Level 8 Level 8 (42,145 points)

    I've never heard of this type of problem but one thing you can try is resetting the DNS settings. I also use Comcast and found I had an issue with the DNS settings they use that created some connectivity issues. After resetting them the problem went away. Give it a shot:

     

    1. System preferences

    2. Network

    3. Click Advanced

    4. Click DNS tab

    5. Click + sign

    6. Add 208.67.222.222

    7. Click + sign

    8. Add 208.67.220.220

    9. Click OK.

    10. Exit System Preferences

     

    If you aren't familiar with what the DNS is here is an article from MacWorld. DNS Troubleshooting

  • 4. Re: Can't find www.google.com
    CW4PWR Level 1 Level 1 (0 points)

    Thanks rkaufmann87,

     

    Deleting the lines in the Host file that redirected Google worked for me.  However, if the file is modified again, I'll try your DNS addresses.

  • 5. Re: Can't find www.google.com
    rkaufmann87 Level 8 Level 8 (42,145 points)

    Your welcome.

     

    Can you give detailed instructions of how you did this, it may help someone down the line.

  • 6. Re: Can't find www.google.com
    MadMacs0 Level 4 Level 4 (3,725 points)

    CW4PWR wrote:

     

    ##

    # Host Database

    #

    # localhost is used to configure the loopback interface

    # when the system is booting.  Do not change this entry.

    ##

    127.0.0.1          localhost

    255.255.255.255          broadcasthost

    ::1             localhost

    fe80::1%lo0          localhost

     

    91.224.160.26 google.com

    91.224.160.26 google.co.uk

    91.224.160.26 google.com.au

    91.224.160.26 google.ca

    91.224.160.26 google.us

    91.224.160.26 www.google.com

    91.224.160.26 www.google.co.uk

    91.224.160.26 www.google.com.au

    91.224.160.26 www.google.ca

    91.224.160.26 www.google.us

    You have been infected by Trojan:BASH/QHost.WB.  I was beginning to think this wasn't an actual threat, but apparently you found it by downloading and installing a fake FlashPlayer.

     

    See http://www.f-secure.com/weblog/archives/00002206.html

     

    Deleting all the 91.224.160.26 entries may fix it, and stay away from Google until you do.  As far as I know nothing bad has happened to anybody that visits that site yet, but once it's activated anything could happen.  If you have any idea where you got it that might help us get all the AV software up-to-date.

  • 7. Re: Can't find www.google.com
    MadMacs0 Level 4 Level 4 (3,725 points)

    If you downloaded the file "FlashPlayer.pkg" mentioned in the f-secure blog and still have it you can do the community a big favor by uploading it to http://www.virustotal.com/.  Assuming there is no entry in the status column next to ClamAV then also upload it to http://cgi.clamav.net/sendvirus.cgi and in the description include the keyword "macos".