diff --git a/Shorewall/Perl/Shorewall/Nat.pm b/Shorewall/Perl/Shorewall/Nat.pm index dc62f9347..e6dccf5e2 100644 --- a/Shorewall/Perl/Shorewall/Nat.pm +++ b/Shorewall/Perl/Shorewall/Nat.pm @@ -714,20 +714,19 @@ sub handle_nat_rule( $$$$$$$$$$$$ ) { if ( $action eq 'DNAT' ) { $target = $action; - my $option = $family == F_IPV4 ? '--to-destination' : '--to-dest'; if ( $server ) { $serverport = ":$serverport" if $serverport; if ( $family == F_IPV4 ) { for my $serv ( split /,/, $server ) { - $target .= " $option ${serv}${serverport}"; + $target .= " --to-destination ${serv}${serverport}"; } } else { for my $serv ( split /,/, $server ) { - $target .= " $option \[${serv}]${serverport}"; + $target .= " --to-destination [${serv}]${serverport}"; } } } else { - $target .= " $option :$serverport"; + $target .= " --to-destination :$serverport"; } }