validating application names or IP addresses variables

This commit is contained in:
2022-09-12 13:00:57 +00:00
parent a326c2646b
commit ae1c4d255d

View File

@@ -323,9 +323,12 @@ else
IPTABLES_OPTIONS=$IPTABLES_OPTIONS" --dport $TARGET_PORT"; IPTABLES_OPTIONS=$IPTABLES_OPTIONS" --dport $TARGET_PORT";
fi fi
if [[ "$SOURCE_IP" != "" && "$TARGET_IP" != "" ]]; then
debug "$IPTABLES -I $CHAIN -p $PROTOCOL $IPTABLES_OPTIONS -m comment --comment "$COMMENT" -j ACCEPT" debug "$IPTABLES -I $CHAIN -p $PROTOCOL $IPTABLES_OPTIONS -m comment --comment "$COMMENT" -j ACCEPT"
$IPTABLES -I $CHAIN -p $PROTOCOL $IPTABLES_OPTIONS -m comment --comment "$COMMENT" -j ACCEPT $IPTABLES -I $CHAIN -p $PROTOCOL $IPTABLES_OPTIONS -m comment --comment "$COMMENT" -j ACCEPT
fi
############################# #############################
fi fi