1

If you wanted to block access of a single machine to all sites whose domain is owned or controlled by Google, how would you go about generating a comprehensive list to add to /etc/hosts? How would you handle Google Apps sites?

  • 2
    Why do you want to block access to Google? Depending upon your real goals/purpose, there may be better ways to achieve it. – D.W. Jun 5 '12 at 20:42
  • 1
    May be related to serverfault.com/questions/118378/… , some answers there will probably solve your problem. – simt Jun 6 '12 at 8:55
2

Maybe a better solution would be to lookup the IP classes owned (registered) by Google and blacklist (deny) them in a firewall (iptables).

To get the IP classes owned by Google, you could start by gathering IP addresses from different classes (maybe using DNS to resolve different well-known Google domains) and using one of the many online WHOIS services (an example) which indicate how much of that class (the subnet mask) is owned by Google.

Just a side note: getting the IP classes is not quite practical and probably not the only way. Not sure if you can find them somewhere already published...

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.