mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 09:04:39 +00:00
filter: outbound nat, allow src/dst port range. closes https://github.com/opnsense/core/issues/4090
This commit is contained in:
parent
d87ce014d9
commit
adbb91289f
@ -155,12 +155,12 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
do_input_validation($pconfig, $reqdfields, $reqdfieldsn, $input_errors);
|
||||
|
||||
if (in_array($pconfig['protocol'], explode(" ", "any tcp udp tcp/udp"))) {
|
||||
if(!empty($pconfig['sourceport']) && !is_portoralias($pconfig['sourceport']))
|
||||
if(!empty($pconfig['sourceport']) && !is_portrange($pconfig['sourceport']) && !is_portoralias($pconfig['sourceport'])) {
|
||||
$input_errors[] = gettext("You must supply either a valid port or port alias for the source port entry.");
|
||||
|
||||
if(!empty($pconfig['dstport']) && !is_portoralias($pconfig['dstport']))
|
||||
}
|
||||
if(!empty($pconfig['dstport']) && !is_portrange($pconfig['dstport']) && !is_portoralias($pconfig['dstport'])) {
|
||||
$input_errors[] = gettext("You must supply either a valid port or port alias for the destination port entry.");
|
||||
|
||||
}
|
||||
if (!empty($pconfig['natport']) && !is_port($pconfig['natport']) && empty($pconfig['nonat'])) {
|
||||
$input_errors[] = gettext("You must supply a valid port for the NAT port entry.");
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user