Bladeren bron

Moved to setup: action definition

Laurent HUBERT 9 maanden geleden
bovenliggende
commit
3e285ac901
2 gewijzigde bestanden met toevoegingen van 16 en 11 verwijderingen
  1. 0 11
      scripts/lfirewall
  2. 16 0
      scripts/setup

+ 0 - 11
scripts/lfirewall

@@ -142,8 +142,6 @@ if ! [ -x $IP_TABLES_RESTORE_6 ]; then
 	exit 6
 fi
 
-
-
 if [ -f $CONFIGURATION_FILE ] ; then
 	set +u
 	. $CONFIGURATION_FILE
@@ -163,15 +161,6 @@ then
 	exit 2
 fi
 
-export IPTABLES_CHECK=__iptables_check_action
-export IPTABLES_ADD=__iptable_add_action
-export IPTABLES_INSERT=__iptable_insert_action
-export IPTABLES_SET_POLICY=__iptable_set_policy_action
-
-export IP_TABLES
-export NETWORK_IF
-
-
 do_exec () {
 	case $1 in
 		__iptable_add_action)

+ 16 - 0
scripts/setup

@@ -34,6 +34,22 @@ IP_TABLES_RESTORE_6="/sbin/ip6tables-restore"
 IP_TABLES_SAVE="/sbin/iptables-save"
 IP_TABLES_SAVE_6="/sbin/ip6tables-save"
 
+###############################################################
+# iptables action definition
+###############################################################
+
+# -C
+export IPTABLES_CHECK=__iptables_check_action
+# -A
+export IPTABLES_ADD=__iptable_add_action
+# -I
+export IPTABLES_INSERT=__iptable_insert_action
+# -P
+export IPTABLES_SET_POLICY=__iptable_set_policy_action
+
+export IP_TABLES
+export NETWORK_IF
+
 
 ###############################################################
 # File and folder paths