10/07/2013, 13:48
|
| | | Fecha de Ingreso: julio-2011 Ubicación: Coahuila
Mensajes: 320
Antigüedad: 13 años, 4 meses Puntos: 8 | |
Iptables facebook Hola a todos
he logrado bloquear FACEBOOK con mi servidor LINUX, pero el problema es que lo bloque para toda la red podemos acceder a cualquier pagina ya sea por http o hhtps solo unicamente restringi las ips de facebook http y https
mi pregunta como puedo hacer que solo mi direccion MAC o IP pueda accerder a facebook mientras los demas no podran hacerlo
este es el codigo que tengo.
#!/bin/sh
/sbin/iptables -F
/sbin/iptables -t mangle -A PREROUTING -d 31.13.76.17 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 31.13.70.17 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 31.13.77.49 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 31.13.77.17 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 31.13.77.34 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 31.13.77.33 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 31.13.77.50 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 31.13.70.2 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 31.13.70.1 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 31.13.77.56 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 31.13.77.57 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 31.13.75.17 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 31.13.75.18 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 31.13.76.8 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 31.13.76.16 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 31.13.77.17 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 31.13.77.39 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 31.13.77.40 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 31.13.77.55 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 31.13.77.87 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 31.13.75.1 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 31.13.76.8 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 31.13.77.39 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 31.13.75.17 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 31.13.77.87 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 69.171.229.25 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 69.141.228.24 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 69.141.247.21 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 69.171.229.25 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 69.171.224.42 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 69.171.224.43 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 69.171.237.20 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 69.171.228.24 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 69.171.237.21 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 69.171.247.29 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 69.171.247.28 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 173.252.110.27 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 173.252.73.52 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 65.201.208.24/29 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 65.204.104.128/28 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 66.93.78.176/29 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 66.92.180.48/28 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 67.200.105.48/30 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 69.63.176.0/20 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 69.171.224.0/19 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 74.119.76.0/22 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 204.15.20.0/22 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 66.220.144.0/20 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 173.252.64.0/18 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 66.199.37.136/29 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 31.13.76.1 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 31.13.75.1 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 199.59.150.7 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 199.59.148.10 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 199.59.149.230 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 199.59.150.39 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 199.59.148.212 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 199.59.148.82 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 199.59.148.87 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 199.59.148.20 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 199.59.149.200 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 199.59.149.232 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 208.43.122.131 -j DROP
/sbin/iptables -t mangle -A PREROUTING -d 208.43.122.132 -j DROP
echo "FACEBOOK ESTA RESTRINGIDO.";
Gracias.
Última edición por Melecio; 12/07/2013 a las 14:47 |