bloqueando o facebook através do firewall netfilter- Resolvido
Autor: Fagner Oliveira IT Soluctions | Publicado: 2012-06-24T10:44:00-03:00

Por: Glauber Alexandre

Nós administradores de redes nos deparamos com vários inconvenientes no ambiente corporativo, e um deles é o chamado "Redes sociais", então através deste post mostrarei como bloquear todos os sites do facebook através do firewall, para quem costumava&nbsp; fazer isso usando proxy transparente não dava certo, pois o usuário colocava "https" no navegador e a requisição passava pelo proxy normalmente. Então crie um script de firewall ou inclua dentro de /etc/rc.local as seguintes linhas:


######Bloqueando o destino#######

iptables -I FORWARD -d AS54115 -j DROP

iptables -I FORWARD -d AS32934 -j DROP

iptables -I FORWARD -d 74.119.76.0/22 -j DROP

iptables -I FORWARD -d 69.63.184.0/21 -j DROP

iptables -I FORWARD -d 69.63.176.0/24 -j DROP

iptables -I FORWARD -d 69.63.176.0/21 -j DROP

iptables -I FORWARD -d 69.171.255.0/24 -j DROP

iptables -I FORWARD -d 69.171.240.0/20 -j DROP

iptables -I FORWARD -d 69.171.239.0/24 -j DROP

iptables -I FORWARD -d 69.171.224.0/20 -j DROP

iptables -I FORWARD -d 66.220.159.0/24 -j DROP

iptables -I FORWARD -d 66.220.152.0/21 -j DROP

iptables -I FORWARD -d 66.220.144.0/21 -j DROP

iptables -I FORWARD -d 31.13.77.0/24 -j DROP

iptables -I FORWARD -d 31.13.76.0/24 -j DROP

iptables -I FORWARD -d 31.13.75.0/24 -j DROP

iptables -I FORWARD -d 31.13.73.0/24 -j DROP

iptables -I FORWARD -d 31.13.72.0/24 -j DROP

iptables -I FORWARD -d 31.13.69.0/24 -j DROP

iptables -I FORWARD -d 31.13.64.0/19 -j DROP

iptables -I FORWARD -d 31.13.24.0/21 -j DROP

iptables -I FORWARD -d 2a03:2880::/32 -j DROP

iptables -I FORWARD -d 2620:0000:1c00::/40 -j DROP

iptables -I FORWARD -d 204.15.20.0/22 -j DROP

iptables -I FORWARD -d 173.252.96.0/19 -j DROP

iptables -I FORWARD -d 173.252.70.0/24 -j DROP

iptables -I FORWARD -d 173.252.64.0/19 -j DROP


######Bloqueando a origem###########


iptables -I FORWARD -s AS54115 -j DROP

iptables -I FORWARD -s AS32934 -j DROP

iptables -I FORWARD -s 74.119.76.0/22 -j DROP

iptables -I FORWARD -s 69.63.184.0/21 -j DROP

iptables -I FORWARD -s 69.63.176.0/24 -j DROP

iptables -I FORWARD -s 69.63.176.0/21 -j DROP

iptables -I FORWARD -s 69.171.255.0/24 -j DROP

iptables -I FORWARD -s 69.171.240.0/20 -j DROP

iptables -I FORWARD -s 69.171.239.0/24 -j DROP

iptables -I FORWARD -s 69.171.224.0/20 -j DROP

iptables -I FORWARD -s 66.220.159.0/24 -j DROP

iptables -I FORWARD -s 66.220.152.0/21 -j DROP

iptables -I FORWARD -s 66.220.144.0/21 -j DROP

iptables -I FORWARD -s 31.13.77.0/24 -j DROP

iptables -I FORWARD -s 31.13.76.0/24 -j DROP

iptables -I FORWARD -s 31.13.75.0/24 -j DROP

iptables -I FORWARD -s 31.13.73.0/24 -j DROP

iptables -I FORWARD -s 31.13.72.0/24 -j DROP

iptables -I FORWARD -s 31.13.69.0/24 -j DROP

iptables -I FORWARD -s 31.13.64.0/19 -j DROP

iptables -I FORWARD -s 31.13.24.0/21 -j DROP

iptables -I FORWARD -s 2a03:2880::/32 -j DROP

iptables -I FORWARD -s 2620:0000:1c00::/40 -j DROP

iptables -I FORWARD -s 204.15.20.0/22 -j DROP

iptables -I FORWARD -s 173.252.96.0/19 -j DROP

iptables -I FORWARD -s 173.252.70.0/24 -j DROP

iptables -I FORWARD -s 173.252.64.0/19 -j DROP

Referêmcia:&nbsp; http://tech-linux.blogspot.com.br/2012/05/bloqueando-o-facebook.html