How to ban Google on your Linux:

echo 1 > /proc/sys/net/ipv6/conf/wlan0/disable_ipv6
route add -net 172.217.0.0 netmask 255.255.0.0 reject
route add -net 66.94.0.0 netmask 255.255.224.0 reject
route add -net 216.58.192.0 netmask 255.255.224.0 reject
route add -net 74.125.0.0 netmask 255.255.0.0 reject
route add -net 64.233.160.0 netmask 255.255.224.0 reject
route add -net 209.85.128.0 netmask 255.255.128.0 reject
route add -net 173.194.0.0 netmask 255.255.0.0 reject
route add -net 208.54.128.0 netmask 255.255.224.0 reject
route add -net 208.54.0.0 netmask 255.255.128.0 reject
route add -net 108.177.0.0 netmask 255.255.128.0 reject

How to unban:

echo 0 > /proc/sys/net/ipv6/conf/wlan0/disable_ipv6
route del -net 172.217.0.0 netmask 255.255.0.0 reject
route del -net 66.94.0.0 netmask 255.255.224.0 reject
route del -net 216.58.192.0 netmask 255.255.224.0 reject
route del -net 74.125.0.0 netmask 255.255.0.0 reject
route del -net 64.233.160.0 netmask 255.255.224.0 reject
route del -net 209.85.128.0 netmask 255.255.128.0 reject
route del -net 173.194.0.0 netmask 255.255.0.0 reject
route del -net 208.54.128.0 netmask 255.255.224.0 reject
route del -net 208.54.0.0 netmask 255.255.128.0 reject
route del -net 108.177.0.0 netmask 255.255.128.0 reject

The first line in both scripts is required only if you have active IPV6.
Dont forget to specify your network card. My card is wlan0. You may have
eth0 or something like that.
This is not a permanent ban. It will go after reboot. 

Назад|На главную