12 Sep 2015, 00:00

Internet (web) without Google (aka Block Google IP addresses)

Block Google, completely

  1. Find Google IP addresses ranges

    Go to https://whois.arin.net/ui/advanced.jsp and Search for “Google LLC”, by Organization… Click each organization found and then select “Related Networks”.

  2. It gave me this list:

    GOOGLE-CLOUD (NET-104-154-0-0-1)    104.154.0.0 - 104.155.255.255
    GOOGLE-CLOUD (NET-35-208-0-0-1)     35.208.0.0 - 35.247.255.255
    GOOGLE-CLOUD (NET-35-192-0-0-1)     35.192.0.0 - 35.207.255.255
    MEEBO (NET6-2620-84-1)  2620:84:: - 2620:84:1:FFFF:FFFF:FFFF:FFFF:FFFF
    GOOGLE-CLOUD (NET-173-255-112-0-1)  173.255.112.0 - 173.255.127.255
    GOOGLE-CLOUD (NET-104-196-0-0-1)    104.196.0.0 - 104.199.255.255
    GOOGLE-CLOUD (NET-192-158-28-0-1)   192.158.28.0 - 192.158.31.255
    GOOGLE-CLOUD (NET-199-192-112-0-1)  199.192.112.0 - 199.192.115.255
    GOOGLE-CLOUD (NET6-2600-1900-1)     2600:1900:: - 2600:190F:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF
    GOOGLE-CLOUD (NET-162-222-176-0-1)  162.222.176.0 - 162.222.183.255
    GOOGLE-CLOUD (NET-107-167-160-0-1)  107.167.160.0 - 107.167.191.255
    GOOGLE-CLOUD (NET-107-178-192-0-1)  107.178.192.0 - 107.178.255.255
    GOOGLE-CLOUD (NET-108-59-80-0-1)    108.59.80.0 - 108.59.95.255
    GOOGLE-CLOUD (NET-130-211-0-0-1)    130.211.0.0 - 130.211.255.255
    GOOGLE-CLOUD (NET-146-148-0-0-1)    146.148.0.0 - 146.148.127.255
    GOOGLE-CLOUD (NET-162-216-148-0-1)  162.216.148.0 - 162.216.151.255
    GOOGLE-CLOUD (NET-199-223-232-0-1)  199.223.232.0 - 199.223.239.255
    GOOGLE-CLOUD (NET-23-251-128-0-1)   23.251.128.0 - 23.251.159.255
    GOOGLE-CLOUD (NET-23-236-48-0-1)    23.236.48.0 - 23.236.63.255
    LVLT-GOOGL-2-8-35-200 (NET-8-35-200-0-1)    8.35.200.0 - 8.35.207.255
    LVLT-GOOGL-2-8-34-216 (NET-8-34-216-0-1)    8.34.216.0 - 8.34.223.255
    LVLT-GOOGL-2-8-34-208 (NET-8-34-208-0-1)    8.34.208.0 - 8.34.215.255
    LVLT-GOOGL-2-8-35-192 (NET-8-35-192-0-1)    8.35.192.0 - 8.35.199.255
    GOOGLE-CLOUD (NET-35-184-0-0-1)     35.184.0.0 - 35.191.255.255
    GOOGLE-CLOUD (NET6-2602-FF11-1)     2602:FF11:: - 2602:FF11:FFF:FFFF:FFFF:FFFF:FFFF:FFFF
    GOOGLE-CLOUD (NET6-2600-2D00-1)     2600:2D00:: - 2600:2D0F:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF
    GOOGLE-CORP-74-125-116-0 (NET-74-125-116-0-1)   74.125.116.0 - 74.125.119.255
    GOOGLE-CORP-74-125-120-0 (NET-74-125-120-0-1)   74.125.120.0 - 74.125.123.255
    GOOGLE-CORP-216-239-35-0 (NET-216-239-35-0-1)   216.239.35.0 - 216.239.35.255
    GOOGLE-CORP (NET-104-132-0-0-1)     104.132.0.0 - 104.135.255.255
    GOOGLE-CORP-74-125-56-0 (NET-74-125-56-0-1)     74.125.56.0 - 74.125.63.255
    GOOGLE-CORP-72-14-224-0 (NET-72-14-224-0-1)     72.14.224.0 - 72.14.231.255
    GOOGLE-CORP-66-249-86-0 (NET-66-249-86-0-1)     66.249.86.0 - 66.249.87.255
    GOOGLE-CORP-66-102-14-0 (NET-66-102-14-0-1)     66.102.14.0 - 66.102.14.255
    GOOGLE-CORP-216-239-39-0 (NET-216-239-39-0-1)   216.239.39.0 - 216.239.39.255
    GOOGLE-CORP-216-239-44-0 (NET-216-239-44-0-1)   216.239.44.0 - 216.239.45.255
    GOOGLE-CORP-216-239-33-0 (NET-216-239-33-0-1)   216.239.33.0 - 216.239.33.255
    GOOGLE-CORP-216-239-55-0 (NET-216-239-55-0-1)   216.239.55.0 - 216.239.55.255
    GOOGLE-CORP-72-14-241-0 (NET-72-14-241-0-1)     72.14.241.0 - 72.14.241.255
    GOOGLE-CORP-V6 (NET6-2620-15C-1)    2620:15C:: - 2620:15C:FFF:FFFF:FFFF:FFFF:FFFF:FFFF
    GOOGLE-IT-IPV6 (NET6-2620-1000-1)   2620:0:1000:: - 2620:0:10FF:FFFF:FFFF:FFFF:FFFF:FFFF
    GOOGLE-TATAC (NET-63-243-224-0-1)   63.243.224.0 - 63.243.224.63
    GOOGLE-TATAC (NET6-2001-5A0-4400-1)     2001:5A0:4400:: - 2001:5A0:4400:FFFF:FFFF:FFFF:FFFF:FFFF
    GOOGLE-VPN (NET-172-102-8-0-1)  172.102.8.0 - 172.102.15.255
    GOOGLE-VPN (NET6-2605-EF80-1)   2605:EF80:: - 2605:EF80:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF
    GOOGLE-VPN (NET-192-104-160-0-1)    192.104.160.0 - 192.104.161.255
    GOOGLE-VPN (NET-216-252-220-0-1)    216.252.220.0 - 216.252.223.255
    GOOGLE-VPN (NET-209-107-176-0-1)    209.107.176.0 - 209.107.191.255
    UU-65-216-183 (NET-65-216-183-0-1)  65.216.183.0 - 65.216.183.255
    UU-63-88-22 (NET-63-88-22-0-1)  63.88.22.0 - 63.88.23.255
    UU-65-220-13 (NET-65-220-13-0-1)    65.220.13.0 - 65.220.13.255
    UU-65-202-192 (NET-65-202-192-0-1)  65.202.192.0 - 65.202.192.255
    UU-65-196-120 (NET-65-196-120-0-1)  65.196.120.0 - 65.196.121.255
    GOOGLE (NET-199-89-220-0-1)     199.89.220.0 - 199.89.220.255
    GOOGLE (NET6-2620-E7-C000-1)    2620:E7:C000:: - 2620:E7:C000:FFFF:FFFF:FFFF:FFFF:FFFF
    Q1208-63-226-245-56 (NET-63-226-245-56-1)   63.226.245.56 - 63.226.245.63
    GOOGLE (NET6-2620-E7-4000-1)    2620:E7:4000:: - 2620:E7:4000:FFFF:FFFF:FFFF:FFFF:FFFF
    GOOGLE (NET-199-88-130-0-1)     199.88.130.0 - 199.88.130.255
    SAVV-S232078-3 (NET-209-185-108-128-1)  209.185.108.128 - 209.185.108.255
    Q0702-63-158-137-224 (NET-63-158-137-224-1)     63.158.137.224 - 63.158.137.231
    Q0708-63-237-119-112 (NET-63-237-119-112-1)     63.237.119.112 - 63.237.119.119
    Q0708-208-46-199-160 (NET-208-46-199-160-1)     208.46.199.160 - 208.46.199.167
    Q0807-67-148-177-136 (NET-67-148-177-136-1)     67.148.177.136 - 67.148.177.143
    GOOGLE (NET-216-239-32-0-1)     216.239.32.0 - 216.239.63.255
    EC12-1-GOOGLE (NET-64-68-80-0-1)    64.68.80.0 - 64.68.87.255
    GOOGLE (NET-66-102-0-0-1)   66.102.0.0 - 66.102.15.255
    GOOGLE (NET-108-177-0-0-1)  108.177.0.0 - 108.177.127.255
    MICH-6184 (NET-198-108-100-192-1)   198.108.100.192 - 198.108.100.207
    SAVV-S232078-1 (NET-216-33-229-144-1)   216.33.229.144 - 216.33.229.151
    SAVV-S232078-2 (NET-216-33-229-160-1)   216.33.229.160 - 216.33.229.167
    SAVV-S232078-26 (NET-64-68-88-0-1)  64.68.88.0 - 64.68.95.255
    SAVV-S232078-11 (NET-216-109-75-80-1)   216.109.75.80 - 216.109.75.95
    SAVV-S232078-24 (NET-64-68-64-64-1)     64.68.64.64 - 64.68.64.127
    SAVV-S232078-21 (NET-64-41-221-192-1)   64.41.221.192 - 64.41.221.207
    MEEBO (NET-199-36-152-0-1)  199.36.152.0 - 199.36.159.255
    GOOGLE (NET-142-250-0-0-1)  142.250.0.0 - 142.251.255.255
    GOOGLE-I83-80 (NET-12-216-80-0-1)   12.216.80.0 - 12.216.80.255
    GOOGLE (NET-216-58-192-0-1)     216.58.192.0 - 216.58.223.255
    GOOGLE (NET-172-217-0-0-1)  172.217.0.0 - 172.217.255.255
    Q0312-2001-0428-6402-0204-0000-0000-0000-0000 (NET6-2001-428-6402-204-1)    2001:428:6402:204:: - 2001:428:6402:204:FFFF:FFFF:FFFF:FFFF
    LVLT-GOGL-8-8-4 (NET-8-8-4-0-1)     8.8.4.0 - 8.8.4.255
    LVLT-GOGL-4-3-2 (NET-4-3-2-0-1)     4.3.2.0 - 4.3.2.255
    LVLT-GOGL-8-8-8 (NET-8-8-8-0-1)     8.8.8.0 - 8.8.8.255
    MEEBO1 (NET-208-81-188-0-1)     208.81.188.0 - 208.81.191.255
    GOOGLE (NET-74-114-24-0-1)  74.114.24.0 - 74.114.31.255
    NET-209-141-120-128-GOOGLE-26 (NET-209-141-120-128-1)   209.141.120.128 - 209.141.120.191
    NET-2605-5800-0-9-DC-64 (NET6-2605-5800-0-9-1)  2605:5800:0:9:: - 2605:5800:0:9:FFFF:FFFF:FFFF:FFFF
    GOOGLE-IPV6 (NET6-2001-4860-1)  2001:4860:: - 2001:4860:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF
    GOOGLE-IPV6 (NET6-2607-F8B0-1)  2607:F8B0:: - 2607:F8B0:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF
    GOOGLE (NET-108-170-192-0-1)    108.170.192.0 - 108.170.255.255
    GOOGLE (NET-172-253-0-0-1)  172.253.0.0 - 172.253.255.255
    GOOGLE (NET-173-194-0-0-1)  173.194.0.0 - 173.194.255.255
    GOOGLE (NET-192-178-0-0-1)  192.178.0.0 - 192.179.255.255
    GOOGLE (NET-207-223-160-0-1)    207.223.160.0 - 207.223.175.255
    GOOGLE (NET-209-85-128-0-1)     209.85.128.0 - 209.85.255.255
    GOOGLE (NET-64-233-160-0-1)     64.233.160.0 - 64.233.191.255
    GOOGLE (NET-66-249-64-0-1)  66.249.64.0 - 66.249.95.255
    GOOGLE (NET-70-32-128-0-1)  70.32.128.0 - 70.32.159.255
    GOOGLE (NET-72-14-192-0-1)  72.14.192.0 - 72.14.255.255
    GOOGLE (NET-74-125-0-0-1)   74.125.0.0 - 74.125.255.255
    METAWEB-001 (NET-208-68-108-0-1)    208.68.108.0 - 208.68.111.255
    NET-209-141-121-192-GOOGLE-26 (NET-209-141-121-192-1)   209.141.121.192 - 209.141.121.255
    NET-209-141-121-128-GOOGLE-26 (NET-209-141-121-128-1)   209.141.121.128 - 209.141.121.191
    NET-2605-5800-0-20-64 (NET6-2605-5800-0-20-1)   2605:5800:0:20:: - 2605:5800:0:20:FFFF:FFFF:FFFF:FFFF
    NET-2605-5800-0-21-64 (NET6-2605-5800-0-21-1)   2605:5800:0:21:: - 2605:5800:0:21:FFFF:FFFF:FFFF:FFFF
    GOOGLE-IPV6 (NET6-2604-31C0-1)  2604:31C0:: - 2604:31C0:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF
    GL-654 (NET-136-22-6-0-1)   136.22.6.0 - 136.22.7.255
    
  3. Next create an iptables/ip6tables script similar to this but with all the IP ranges from above:

    #!/bin/sh  
    # /etc/init.d/firewall
    
    
    IPT="/sbin/iptables"  
    IPT6="/sbin/ip6tables"  
    
    
    # Block Google
    $IPT -A INPUT -s 64.233.160.0/19 -j DROP  
    $IPT -A OUTPUT -d 64.233.160.0/19 -j DROP
    $IPT -A INPUT -s 2c0f:fb50:4000::/36 -j DROP
    $IPT -A OUTPUT -d 2c0f:fb50:4000::/36 -j DROP