Changing execution orders
This commit is contained in:
@@ -49,15 +49,6 @@ elif [[ "$(echo $TARGET_IP | cut -d . -f4)" == "0" ]] ; then
|
||||
debug "target ip is $TARGET_IP"
|
||||
fi;
|
||||
|
||||
##############################
|
||||
|
||||
echo 1 > /proc/sys/net/ipv4/ip_forward
|
||||
|
||||
##############################
|
||||
|
||||
IPTABLES=/sbin/iptables-legacy
|
||||
|
||||
###############################
|
||||
|
||||
prerouting() {
|
||||
LINES=$($IPTABLES -L --line-number -n | grep $SOURCE_PORT |grep $TARGET_IP |grep $TARGET_PORT |grep $COMMENT | awk '{print $1}'| tac)
|
||||
@@ -130,8 +121,19 @@ if [[ "$ROUTE" == "true" ]] ; then
|
||||
|
||||
debug "ip_route: "$IP_ROUTE;
|
||||
ip_route;
|
||||
exit;
|
||||
fi
|
||||
|
||||
##############################
|
||||
|
||||
echo 1 > /proc/sys/net/ipv4/ip_forward
|
||||
|
||||
##############################
|
||||
|
||||
IPTABLES=/sbin/iptables-legacy
|
||||
|
||||
###############################
|
||||
|
||||
COUNT_SOURCE_IP=$(set |grep SOURCE_IP |wc -l)
|
||||
COUNT_SOURCE_PORT=$(set |grep SOURCE_PORT |wc -l)
|
||||
COUNT_TARGET_IP=$(set |grep TARGET_IP |wc -l)
|
||||
|
Reference in New Issue
Block a user