#!/bin/sh

. /app/config/network_wan.ini
. /app/config/network_lan.ini
. /app/scripts/eipr_type


# Flush iptables
#
iptables -F
iptables -F -t nat

# If firewall is enabled
if [ "$EIPR_FW" != "NO" ]; then
# Set default policies of built-in chains to drop
#
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT

iptables -t nat -P PREROUTING ACCEPT
iptables -t nat -P POSTROUTING DROP
iptables -t nat -P OUTPUT ACCEPT

fi

# exit
exit 0
