diff --git a/firewall/firewall-add b/firewall/firewall-add index aa7c240..ed253cd 100755 --- a/firewall/firewall-add +++ b/firewall/firewall-add @@ -248,9 +248,10 @@ fi prerouting() { if [ "$(set |grep -w SOURCE_IFACE)" != "" ]; then + if [ "$TARGET_IP" != "" ] && [ "$TARGET_PORT" != "" ] ; then debug "$IPTABLES -I PREROUTING -i $SOURCE_IFACE -p $PROTOCOL --dport $SOURCE_PORT -m comment --comment $COMMENT -j DNAT --to $TARGET_IP:$TARGET_PORT" $IPTABLES -w -I PREROUTING -i $SOURCE_IFACE -p $PROTOCOL --dport $SOURCE_PORT -m comment --comment "$COMMENT" -j DNAT --to $TARGET_IP:$TARGET_PORT - + fi elif [ "$SOURCE_IP" != "" ]; then if [ "$SOURCE_PORT" != "" ]; then if [ "$TARGET_IP" != "" ]; then