Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Latest commit 79570ee Sep 18, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information. Update Sep 18, 2019
UNLICENSE Create UNLICENSE Jul 10, 2019 Create Apr 27, 2019


This BASH (Linux) script simplifies the process of cutting Google out of your digital life.

This will block all Google services - GMail, YouTube, Google Play, ads, tracking and so on, both good and bad. It's worth noting that any sites that depend on Google to serve their content most likely will break, or at a minimum not function properly.

It works by adding all the downloaded Google IP ranges to the routing table, which get routed to localhost and thus stays local to your machine and doesn't reach any Google servers.

Tested on Ubuntu 18.04 only.

Contacts third-party network services to retrieve proxies and IP ranges.

If you don't agree to their respective terms of service (ToS), don't use the script or modify it to suit your needs.

Using the script

Using the terminal, navigate to the directory where the script is; e.g;

cd $HOME/Downloads

Make the script executable

chmod +x

The script needs to be run as root to be able to modify the routing table, and takes an argument to either block or unblock Google. To avoid issues where Google has already been blocked, it will attempt to download the IP ranges through proxies when unreachable.

To block Google;

sudo ./ -b

To unblock Google;

sudo ./ -u


Regular updating of the Google IP range list can be scheduled through crontab.

Open the root crontab;

sudo crontab -e

Add the crontab, e.g;

# block-all-google
00 18 * * 7 "$HOME/Scripts/ -b"

This example will run the script every Sunday at 6:00pm.

To add logging;

# block-all-google
00 18 * * 7 "$HOME/Scripts/ -b" >> /var/log/block-all-google.cron.log 2>&1

Save and exit.


To contribute, or to report issues please use the Issue Tracker.



See UNLICENSE for more information.

You can’t perform that action at this time.