mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Handle multiple port redirection correctly
This commit is contained in:
parent
dad547ef99
commit
8f39b49bf9
@ -819,11 +819,11 @@ function filter_nat_rules_generate() {
|
||||
} 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]}" .
|
||||
"rdr on $natif proto { tcp udp } from any to {$extaddr} port {$extport[0]}:{$extport[1]} -> {$target} port {$extport[0]}:*" .
|
||||
"-> {$target}";
|
||||
else
|
||||
$natrules .=
|
||||
"rdr on $natif proto " . $rule['protocol']. " from any to {$extaddr} port {$extport[0]}:{$extport[1]} -> {$target} port {$extport[0]}:{$extport[1]}" .
|
||||
"rdr on $natif proto " . $rule['protocol']. " from any to {$extaddr} port {$extport[0]}:{$extport[1]} -> {$target} port {$extport[0]}:*" .
|
||||
"-> {$target}";
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user