﻿{"id":383,"date":"2012-10-14T19:44:55","date_gmt":"2012-10-14T22:44:55","guid":{"rendered":"http:\/\/binsfeld.com.br\/wp\/?p=383"},"modified":"2013-02-11T12:32:15","modified_gmt":"2013-02-11T15:32:15","slug":"script-bloqueio-de-social-im-via-iptables","status":"publish","type":"post","link":"http:\/\/binsfeld.com.br\/wp\/?p=383","title":{"rendered":"Script Bloqueio de Social IM via Iptables"},"content":{"rendered":"<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>#!\/bin\/bash<br \/>\n#&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n#<br \/>\n# File: blocksocialim.sh<br \/>\n# Descricao : Bloqueio HTTPS<br \/>\n# Social Networks : http:\/\/bgp.he.net &#8211; Facebook, Twitter, Youtube, Meebo, MySpace, Badoo<br \/>\n# Modificado : Marlo Luiz Binsfeld<br \/>\n# Original : http:\/\/www.vivaolinux.com.br\/dica\/Bloquear-Facebook-acessado-por-HTTPS-(iptables)<br \/>\n#<br \/>\n#&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\nSOCIALIM_ALLOW=&#8221;&#8221;<br \/>\nSOCIALIM_IP_RANGE=&#8221;74.119.76.0\/22 69.63.184.0\/21 69.63.176.0\/24 69.63.176.0\/21 69.171.255.0\/24 69.171.240.0\/20 69.171.239.0\/24 69.171.224.0\/20 66.220.159.0\/24 66.220.152.0\/21 66.220.144.0\/21 31.13.80.0\/24 31.13.79.0\/24 31.13.78.0\/24 31.13.77.0\/24 31.13.76.0\/24 31.13.75.0\/24 31.13.74.0\/24 31.13.73.0\/24 31.13.72.0\/24 31.13.71.0\/24 31.13.70.0\/24 31.13.69.0\/24 31.13.66.0\/24 31.13.65.0\/24 31.13.64.0\/24 31.13.64.0\/19 31.13.24.0\/21 204.15.20.0\/22 173.252.96.0\/19 173.252.70.0\/24 173.252.64.0\/19 199.96.57.0\/24 199.96.56.0\/24 199.59.148.0\/22 199.16.156.0\/22 82.129.37.0\/24 64.15.126.0\/24 64.15.125.0\/24 64.15.124.0\/24 64.15.121.0\/24 64.15.120.0\/24 64.15.120.0\/22 64.15.120.0\/21 64.15.119.0\/24 64.15.118.0\/24 64.15.117.0\/24 64.15.116.0\/24 64.15.115.0\/24 64.15.114.0\/24 64.15.113.0\/24 64.15.112.0\/24 64.15.112.0\/21 64.15.112.0\/20 213.146.171.0\/24 208.65.155.0\/24 208.65.154.0\/24 208.65.152.0\/23 208.65.152.0\/22 208.117.255.0\/24 208.117.254.0\/24 208.117.253.0\/24 208.117.252.0\/24 208.117.251.0\/24 208.117.250.0\/24 208.117.249.0\/24 208.117.248.0\/24 208.117.248.0\/21 208.117.245.0\/24 208.117.244.0\/24 208.117.243.0\/24 208.117.242.0\/24 208.117.241.0\/24 208.117.240.0\/24 208.117.239.0\/24 208.117.238.0\/24 208.117.237.0\/24 208.117.236.0\/24 208.117.235.0\/24 208.117.234.0\/24 208.117.233.0\/24 208.117.232.0\/24 208.117.231.0\/24 208.117.230.0\/24 208.117.229.0\/24 208.117.228.0\/24 208.117.227.0\/24 208.117.226.0\/24 208.117.225.0\/24 208.117.224.0\/24 208.117.224.0\/19 74.114.27.0\/24 74.114.26.0\/24 74.114.24.0\/21 208.81.188.0\/22 199.36.158.0\/24 199.36.158.0\/23 199.36.156.0\/23 199.36.152.0\/22 63.135.92.0\/22 63.135.88.0\/22 63.135.86.0\/24 63.135.84.0\/23 63.135.80.0\/22 63.135.80.0\/20 216.178.46.0\/23 216.178.44.0\/23 216.178.42.0\/23 216.178.41.0\/24 216.178.40.0\/24 216.178.38.0\/23 216.178.32.0\/20 204.16.32.0\/22 87.245.199.0\/24 64.209.21.0\/24 31.222.78.0\/23 31.222.76.0\/23 31.222.74.0\/23 31.222.72.0\/23 31.222.71.0\/24 31.222.70.0\/24 31.222.70.0\/23 31.222.68.0\/23 31.222.66.0\/23 31.222.64.0\/23 159.253.183.0\/24 159.253.182.0\/24 159.253.180.0\/23 159.253.178.0\/23 159.253.176.0\/23 159.253.176.0\/22 173.194.42.0 173.194.42.1 173.194.42.14 173.194.42.2 173.194.42.3 173.194.42.32 173.194.42.33 173.194.42.34 173.194.42.35 173.194.42.36 173.194.42.37 173.194.42.38 173.194.42.39 173.194.42.4 173.194.42.40 173.194.42.41 173.194.42.46 173.194.42.5 173.194.42.6 173.194.42.7 173.194.42.8 173.194.42.9 173.252.96.0\/19 204.15.20.0\/22&#8243;<\/p>\n<p>iptables -N SOCIALIM<\/p>\n<p>## SOCIALIM DENY<br \/>\nfor socialim in $SOCIALIM_IP_RANGE; do<br \/>\niptables -I FORWARD -m tcp -p tcp -d $socialim &#8211;dport 443 -j SOCIALIM<br \/>\ndone<br \/>\niptables -A SOCIALIM -j REJECT<\/p>\n<p>## SOCIALIM ALLOW<br \/>\nfor socialimallow in $SOCIALIM_ALLOW; do<br \/>\niptables -I SOCIALIM -s $socialimallow -j ACCEPT<br \/>\ndone<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>Cr\u00e9ditos : http:\/\/www.vivaolinux.com.br\/dica\/Bloquear-Facebook-acessado-por-HTTPS-(iptables)<br \/>\nhttp:\/\/bgp.he.net\/<br \/>\nDownload : <a title=\"blocksocialim.sh\" href=\"http:\/\/binsfeld.com.br\/wp\/wp-content\/uploads\/2012\/12\/blocksocialim.sh\">blocksocialim.sh<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- #!\/bin\/bash #&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; # # File: blocksocialim.sh # Descricao : Bloqueio HTTPS # Social Networks : http:\/\/bgp.he.net &#8211; Facebook, Twitter, Youtube, Meebo, MySpace, Badoo # Modificado : Marlo Luiz Binsfeld<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-383","post","type-post","status-publish","format-standard","hentry","category-firewall"],"_links":{"self":[{"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=\/wp\/v2\/posts\/383"}],"collection":[{"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=383"}],"version-history":[{"count":8,"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=\/wp\/v2\/posts\/383\/revisions"}],"predecessor-version":[{"id":426,"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=\/wp\/v2\/posts\/383\/revisions\/426"}],"wp:attachment":[{"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=383"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=383"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/binsfeld.com.br\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=383"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}