[Lugro-mesh] Reglas IPtable repetidas y contradictorias...

Horacio Castellini horacio9573 en hotmail.com
Dom Sep 19 12:27:28 ART 2010



> > Holas, explorando las reglas de iptable he hallado que algunas reglas son
> > contradictorias... por ejemplo:
> > root en nightwing:~# iptables -LChain INPUT (policy ACCEPT)target     prot opt
> > source               destination         ACCEPT     tcp  --  anywhere
> >      anywhere            tcp dpt:80 ACCEPT     tcp  --  anywhere
> > anywhere            tcp dpt:22 ACCEPT     tcp  --  anywhere
> > anywhere            tcp dpt:80 ACCEPT     tcp  --  anywhere
> > anywhere            tcp dpt:22 DROP       tcp  --  anywhere
> > anywhere            tcp dpt:80 DROP       tcp  --  anywhere
> > anywhere            tcp dpt:22
> >

Uhmm...
Fijandome en las interfaces las úntimas reglas apuntan a todas las interfaces... creo que la precedencia es la que prevalece y por eso no bloquea a lo loco...
root en nightwing:~# iptables -L -vChain INPUT (policy ACCEPT 5186K packets, 315M bytes) pkts bytes target     prot opt in     out     source               destination             0     0 ACCEPT     tcp  --  eth0   any     anywhere             anywhere            tcp dpt:80  8721  632K ACCEPT     tcp  --  eth0   any     anywhere             anywhere            tcp dpt:22     0     0 ACCEPT     tcp  --  ath1   any     anywhere             anywhere            tcp dpt:80     0     0 ACCEPT     tcp  --  ath1   any     anywhere             anywhere            tcp dpt:22 ----------------------------------------------    9   432 DROP       tcp  --  any    any     anywhere             anywhere            tcp dpt:80      0     0 DROP       tcp  --  any    any     anywhere             anywhere            tcp dpt:22 -----------------------------------------------
entonces las interfaces bat0 ,  ath0,  wifi0 tienen el 22 y el 80 bloqueados... para evitar los ataques de "los nenes bien"... 
la tabla "mangle" está habilitada, por lo menos en esta versión... o me equivoco? para así poder usar la sugerencia de G:L....  		 	   		  


Más información sobre la lista de distribución Lugro-mesh