Jak vynulovat pravidla v iptables.

Kilian Igor Igor.Kilian na infogas.sk
Pátek Červenec 9 14:22:06 CEST 2004


ja osobne to v shell scripte robim takto
(aj ked mate svoje vlastne chainy, tak
ich vycisti):

# Cesta k programu iptables
IPTABLES="/sbin/iptables"

# Vycistenie iptables
chains=`cat /proc/net/ip_tables_names 2>/dev/null`
for i in $chains; do $IPTABLES -t $i -F; done
for i in $chains; do $IPTABLES -t $i -X; done

# Nastavenie akceptacie zakl. chainov
$IPTABLES -P INPUT ACCEPT
$IPTABLES -P OUTPUT ACCEPT
$IPTABLES -P FORWARD ACCEPT
#$IPTABLES -P PREROUTING ACCEPT
#$IPTABLES -P POSTROUTING ACCEPT
#$IPTABLES -P OUTPUT ACCEPT
#$IPTABLES -P PREROUTING ACCEPT
#$IPTABLES -P OUTPUT ACCEPT


pravdaze ta akceptacia chainov 
je vhodna na to, aby neostal nejaky chain
ako DROP (ak tak bol zadefinovany).
to pravdaze mozno nebudete chciet.

Igor


Další informace o konferenci Linux