#!/bin/sh
#
# rc.firewall
#
# (c) 2014 Felipe Eduardo Sanchez Diaz Duran
# Todos los derechos reservados
#
#

VERSION="1.3.2"
FECHA="20140704"

# Ruta hacia iptables
IPTABLES=/sbin/iptables

echo "Flushing iptables and default policies..."

for table in INPUT FORWARD OUTPUT; do
   $IPTABLES -P "$table" ACCEPT
done

# mangle
for table in PREROUTING INPUT FORWARD OUTPUT POSTROUTING; do
   $IPTABLES -t mangle -P "$table" ACCEPT
done

# nat
for table in PREROUTING INPUT OUTPUT POSTROUTING; do
   $IPTABLES -t nat -P "$table" ACCEPT
done

$IPTABLES -F
$IPTABLES -F -t nat
$IPTABLES -F -t mangle
