fernandoselect
(usa Red Hat)
Enviado em 29/01/2013 - 13:36h
ola, sou iniciante, tenho que bloquear facebook e gmail
o bloqueio nao pode afetar os outros sites como bancos etc.
foram colocados as linhas abaixo no arquivo rc.local e nao resolveu.
#BLOQUEIO DO FACEBOOK
# em facebook_ip_range tenho que colocar a minha faixa de ip ou deixo assim mesmo. nao entendi)
FACEBOOK_IP_RANGE="31.13.64.0-31.13.127.255 31.13.24.0-31.13.31.255 74.119.76.0-74.119.79.255 69.63.176.0-69.63.191.255 69.171.224.0-69.171.255.255 66.220.144.0-66.220.159.255 204.15.20.0-204.15.23.255 173.252.64.0-173.252.127.255 82.129.37.0-82.129.37.255 64.15.126.0-64.15.126.255 64.15.125.
0-64.15.125.255 64.15.124.0-64.15.124.255 64.15.121.0-64.15.121.255 64.15.120.0-
64.15.120.255 64.15.120.0-64.15.120.255 64.15.120.0-64.15.120.255 64.15.119.0-64
.15.119.255 64.15.118.0-64.15.118.255 64.15.117.0-64.15.117.255 64.15.116.0-64.1
5.116.255 64.15.115.0-64.15.115.255 64.15.114.0-64.15.114.255 64.15.113.0-64.15.
113.255 64.15.112.0-64.15.112.255 64.15.112.0-64.15.112.255 64.15.112.0-64.15.11
2.255 213.146.171.0-213.146.171.255 208.65.155.0-208.65.155.255 208.65.154.0-208
.65.154.255 208.65.152.0-208.65.152.255 208.65.152.0-208.65.152.255 208.117.255.
0-208.117.255.255 208.117.254.0-208.117.254.255 208.117.253.0-208.117.253.255 20
8.117.252.0-208.117.252.255 208.117.251.0-208.117.251.255 208.117.250.0-208.117.
250.255 208.117.249.0-208.117.249.255 208.117.248.0-208.117.248.255 208.117.248.
0-208.117.248.255 208.117.245.0-208.117.245.255 208.117.244.0-208.117.244.255 20
8.117.243.0-208.117.243.255 208.117.242.0-208.117.242.255 208.117.241.0-208.117.
241.255 208.117.240.0-208.117.240.255 208.117.239.0-208.117.239.255 208.117.238.
0-208.117.238.255 208.117.237.0-208.117.237.255 208.117.236.0-208.117.236.255 20
8.117.235.0-208.117.235.255 208.117.234.0-208.117.234.255 208.117.233.0-208.117.
233.255 208.117.232.0-208.117.232.255 208.117.231.0-208.117.231.255 208.117.230.
0-208.117.230.255 208.117.229.00208.117.229.255 208.117.228.0-208.117.228.255 20
8.117.227.0-208.117.227.255 208.117.226.0-208.117.226.255 208.117.225.0-208.117.
225.255 208.117.224.0-208.117.224.255 208.117.224.0-208.117.224.255
iptables -N FACEBOOK
## FACEBOOK DENY
for face in $FACEBOOK_IP_RANGE; do #(aqui tenho que colocar toda faixa do meu ip,ou deixo assim mesmo, nao entendi)
iptables -I FORWARD -m tcp -p tcp -m iprange --dst-range $face --dport 443 -j FACEBOOK
iptables -I FORWARD -m tcp -p tcp -m iprange --dst-range $face --dport 80 -j FACEBOOK
done
FACEBOOK_ALLOW="192.168.218.73" # (esta linha nao entendi pra que serve)
for MSR_LIBERADO in $FACEBOOK_ALLOW; do
iptables -I FACEBOOK -s $MSR_LIBERADO -j ACCEPT
done
iptables -A FACEBOOK -j REJECT
exit 0
# nao funcionou
por favor m ajudem
pode ser de outra forma ou direto no squid ou iptables, sei la me ajudem
sou iniciante. att fernando