prueba aplicando esta regla y nos cuentas si te funciona
iptables -I INPUT -s a.b.c.d -i ethx -p tcp --dport 80 -j REJECT en esta regla lo que hace basicamente es todo lo ke llega de la ip a.b.c.d a la interfaz ethx del server linux y que tiene como objetivo el puerto 80 lo rechaza... -----Mensaje original----- De: Miguel Da Silva - Centro de Matemática [mailto:[EMAIL PROTECTED] Enviado el: Lunes, 24 de Septiembre de 2007 09:35 a.m. Para: DUS Asunto: Re: Bloqueo de una IP con iptables Miguel J. Jiménez escribió: > Hola lista... Mi situación es la siguiente.. Quiero bloquear un ip > específica con IPTABLES dígase X.Y.Z.T . El problema es que antes de > definir la regla del bloqueo, permito el acceso a todo el mundo al > puerto 80. Al hacer un "iptables -L", me sale lo siguiente: > > Chain INPUT (policy DROP) > > target prot opt source destination ACCEPT > all -- anywhere anywhere ACCEPT all -- > anywhere anywhere state RELATED,ESTABLISHED > ACCEPT tcp -- 192.168.0.0/16 > pitufina.108.168.192.in-addr.arpa tcp dpt:www flags:FIN,SYN,RST,ACK/SYN > state NEW ACCEPT tcp -- 192.168.0.0/16 > pitufina.108.168.192.in-addr.arpa tcp dpt:https > flags:FIN,SYN,RST,ACK/SYN state NEW ACCEPT tcp -- > 192.168.0.0/16 pitufina.108.168.192.in-addr.arpa tcp dpt:webcache > flags:FIN,SYN,RST,ACK/SYN state NEW ACCEPT tcp -- > 192.168.0.0/16 pitufina.108.168.192.in-addr.arpa tcp dpt:52673 > flags:FIN,SYN,RST,ACK/SYN state NEW ACCEPT tcp -- > anywhere pitufina.108.168.192.in-addr.arpa tcp dpt:ssh > flags:FIN,SYN,RST,ACK/SYN state NEW ACCEPT tcp -- > 172.25.1.34 pitufina.108.168.192.in-addr.arpa tcp dpt:www > flags:FIN,SYN,RST,ACK/SYN state NEW ACCEPT tcp -- > 172.25.1.34 pitufina.108.168.192.in-addr.arpa tcp dpt:https > flags:FIN,SYN,RST,ACK/SYN state NEW ACCEPT tcp -- > 172.25.1.34 pitufina.108.168.192.in-addr.arpa tcp dpt:webcache > flags:FIN,SYN,RST,ACK/SYN state NEW ACCEPT udp -- ouija > pitufina.108.168.192.in-addr.arpa udp dpts:5004:5082 ACCEPT udp -- > ouija pitufina.108.168.192.in-addr.arpa udp dpts:10000:20049 > DROP all -- 192.168.102.5 > pitufina.108.168.192.in-addr.arpa DROP all -- > 192.168.109.25 pitufina.108.168.192.in-addr.arpa DROP all > -- 192.168.102.142 pitufina.108.168.192.in-addr.arpa DROP > all -- 192.168.109.169 pitufina.108.168.192.in-addr.arpa > Chain FORWARD (policy DROP) > target prot opt source destination > Chain OUTPUT (policy DROP) > target prot opt source destination ACCEPT > all -- anywhere anywhere ACCEPT all -- > anywhere anywhere > > Sin embargo las IP que quiero prohibir siguen pudiendo entrar... ¿debo > hacer antes el bloqueo que el permitir el tráfico al puerto 80? Gracias > Es que iptables aplica la primera regla que encuentra. Te conviene primero bloquear la ip en cuestión y después habilitar las demás. O sino hacer directamente una regla que abra el puerto 80 a todas las máquinas salvo la que tenga la ip prohibida. Saludos. -- Miguel Da Silva Administrador de Red Centro de Matemática - http://www.cmat.edu.uy Facultad de Ciencias - http://www.fcien.edu.uy Universidad de la República - http://www.rau.edu.uy -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.488 / Virus Database: 269.13.30/1027 - Release Date: 24/09/2007 11:27 a.m.

