|
@@ -5,7 +5,7 @@ confd=/etc/e-router
|
|
|
iptables="${IPTABLESCMD:-iptables -w}"
|
|
iptables="${IPTABLESCMD:-iptables -w}"
|
|
|
source $confd/config
|
|
source $confd/config
|
|
|
|
|
|
|
|
-set_defaults() {
|
|
|
|
|
|
|
+base() {
|
|
|
/usr/lib/systemd/scripts/iptables-flush
|
|
/usr/lib/systemd/scripts/iptables-flush
|
|
|
${iptables} -P INPUT DROP
|
|
${iptables} -P INPUT DROP
|
|
|
${iptables} -P FORWARD DROP
|
|
${iptables} -P FORWARD DROP
|
|
@@ -15,7 +15,7 @@ set_defaults() {
|
|
|
${iptables} -A INPUT -m conntrack --ctstate INVALID -j DROP
|
|
${iptables} -A INPUT -m conntrack --ctstate INVALID -j DROP
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-setup_final(){
|
|
|
|
|
|
|
+final(){
|
|
|
if $loginput ; then
|
|
if $loginput ; then
|
|
|
${iptables} -A INPUT -j WAN-LOG-DROP
|
|
${iptables} -A INPUT -j WAN-LOG-DROP
|
|
|
fi
|
|
fi
|
|
@@ -154,9 +154,7 @@ setup_cast() {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
main () {
|
|
main () {
|
|
|
- defaultHooks="set_defaults lan setup_wandroplog setup_fordroplog setup_whitenets setup_forward setup_badips setup_white setup_public setup_scanips setup_cast setup_final"
|
|
|
|
|
- hookarray=(${hooks:-$defaultHooks})
|
|
|
|
|
- for hook in "${hookarray[@]}" ; do
|
|
|
|
|
|
|
+ for hook in "${hooks[@]}" ; do
|
|
|
$hook
|
|
$hook
|
|
|
done
|
|
done
|
|
|
}
|
|
}
|