Modifying source or target IP addresses in case of POSTROUTING rules is applied
This commit is contained in:
@@ -39,6 +39,17 @@ elif [[ "$(echo $SOURCE_IP | cut -d . -f4)" == "0" ]] ; then
|
|||||||
SOURCE_IP="$SOURCE_IP/24";
|
SOURCE_IP="$SOURCE_IP/24";
|
||||||
debug "source ip is $SOURCE_IP"
|
debug "source ip is $SOURCE_IP"
|
||||||
|
|
||||||
|
# Modifying source or target IP addresses if POSTROUTING rules needed to applied
|
||||||
|
elif [[ ! -z "$POSTROUTING" ]]; then
|
||||||
|
if [[ ! -z "$SOURCE_IP" ]]; then
|
||||||
|
SOURCE_IP="$(echo $SOURCE_IP | cut -d . -f1-3).0/24";
|
||||||
|
debug "source ip is $SOURCE_IP"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ! -z "$TARGET_IP" ]]; then
|
||||||
|
TARGET_IP="$(echo $TARGET_IP | cut -d . -f1-3).0/24";
|
||||||
|
debug "target ip is $TARGET_IP"
|
||||||
|
fi
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
if [[ -z "$TARGET_IP" ]]; then
|
if [[ -z "$TARGET_IP" ]]; then
|
||||||
|
Reference in New Issue
Block a user