victor.p
(usa Ubuntu)
Enviado em 18/06/2013 - 17:08h
kidokb escreveu:
Testa esse. Funciona aqui.
FACEBOOK_IP_RANGE="31.13.01.01-31.13.254.254 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 173.152.100.1-173.152.110.254 69.171.224.0-69.171.255.255 200.182.35.186-200.182.35.187"
iptables -N FACEBOOK
for face in $FACEBOOK_IP_RANGE; do
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="10.0.0.163 10.0.0.160 10.0.0.158 10.0.0.98 10.0.0.156"
for MSR in $FACEBOOK_ALLOW; do
iptables -I FACEBOOK -s $MSR -j ACCEPT
done
iptables -A FACEBOOK -j REJECT
Deu esse erro:
iptables v1.4.12.2: option "--dport" requires an argument
Try `iptables -h' or 'iptables --help' for more information.
./rc.facebook: line 13: 443: command not found
iptables v1.4.12.2: option "--dport" requires an argument
Try `iptables -h' or 'iptables --help' for more information.
./rc.facebook: line 15: 80: command not found
iptables v1.4.12.2: option "--dport" requires an argument
Try `iptables -h' or 'iptables --help' for more information.
./rc.facebook: line 13: 443: command not found
iptables v1.4.12.2: option "--dport" requires an argument
Try `iptables -h' or 'iptables --help' for more information.
./rc.facebook: line 15: 80: command not found
iptables v1.4.12.2: option "--dport" requires an argument
Try `iptables -h' or 'iptables --help' for more information.
./rc.facebook: line 13: 443: command not found
iptables v1.4.12.2: option "--dport" requires an argument
Try `iptables -h' or 'iptables --help' for more information.
./rc.facebook: line 15: 80: command not found
iptables v1.4.12.2: option "--dport" requires an argument
Try `iptables -h' or 'iptables --help' for more information.
./rc.facebook: line 13: 443: command not found
iptables v1.4.12.2: option "--dport" requires an argument
Try `iptables -h' or 'iptables --help' for more information.
./rc.facebook: line 15: 80: command not found
iptables v1.4.12.2: option "--dport" requires an argument
Try `iptables -h' or 'iptables --help' for more information.
./rc.facebook: line 13: 443: command not found
iptables v1.4.12.2: option "--dport" requires an argument
Try `iptables -h' or 'iptables --help' for more information.
./rc.facebook: line 15: 80: command not found
iptables v1.4.12.2: option "--dport" requires an argument
Try `iptables -h' or 'iptables --help' for more information.
./rc.facebook: line 13: 443: command not found
iptables v1.4.12.2: option "--dport" requires an argument
Try `iptables -h' or 'iptables --help' for more information.
./rc.facebook: line 15: 80: command not found
iptables v1.4.12.2: option "--dport" requires an argument
Try `iptables -h' or 'iptables --help' for more information.
./rc.facebook: line 13: 443: command not found
iptables v1.4.12.2: option "--dport" requires an argument
Try `iptables -h' or 'iptables --help' for more information.
./rc.facebook: line 15: 80: command not found
iptables v1.4.12.2: option "--dport" requires an argument
Try `iptables -h' or 'iptables --help' for more information.
./rc.facebook: line 13: 443: command not found
iptables v1.4.12.2: option "--dport" requires an argument
Try `iptables -h' or 'iptables --help' for more information.
./rc.facebook: line 15: 80: command not found
iptables v1.4.12.2: option "--dport" requires an argument
Try `iptables -h' or 'iptables --help' for more information.
./rc.facebook: line 13: 443: command not found
iptables v1.4.12.2: option "--dport" requires an argument
Try `iptables -h' or 'iptables --help' for more information.
./rc.facebook: line 15: 80: command not found
iptables v1.4.12.2: option "--dport" requires an argument
Try `iptables -h' or 'iptables --help' for more information.
./rc.facebook: line 13: 443: command not found
iptables v1.4.12.2: option "--dport" requires an argument
Try `iptables -h' or 'iptables --help' for more information.
./rc.facebook: line 15: 80: command not found