mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
No need for 2 carriage returns after rdr rule.
This commit is contained in:
parent
1e024d52af
commit
564a42cf8e
@ -815,20 +815,20 @@ function filter_nat_rules_generate() {
|
||||
if ((!$extport[1]) || ($extport[0] == $extport[1])) {
|
||||
if($rule['protocol'] == "tcp/udp")
|
||||
$natrules .=
|
||||
"rdr on $natif proto { tcp udp } from any to {$extaddr} port {$extport[0]} -> {$target} port {$rule['local-port']}\n";
|
||||
"rdr on $natif proto { tcp udp } from any to {$extaddr} port {$extport[0]} -> {$target} port {$rule['local-port']}";
|
||||
else
|
||||
$natrules .=
|
||||
"rdr on $natif proto " . $rule['protocol'] . " from any to {$extaddr} port {$extport[0]} -> {$target} port {$rule['local-port']}\n";
|
||||
"rdr on $natif proto " . $rule['protocol'] . " from any to {$extaddr} port {$extport[0]} -> {$target} port {$rule['local-port']}";
|
||||
|
||||
} else {
|
||||
if($rule['protocol'] == "tcp/udp")
|
||||
$natrules .=
|
||||
"rdr on $natif proto { tcp udp } from any to {$extaddr} port {$extport[0]}:{$extport[1]} -> {$target} port {$extport[0]}:{$extport[1]}" .
|
||||
"-> {$target} \n";
|
||||
"-> {$target}";
|
||||
else
|
||||
$natrules .=
|
||||
"rdr on $natif proto " . $rule['protocol']. " from any to {$extaddr} port {$extport[0]}:{$extport[1]} -> {$target} port {$extport[0]}:{$extport[1]}" .
|
||||
"-> {$target} \n";
|
||||
"-> {$target}";
|
||||
}
|
||||
|
||||
$natrules .= "\n";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user