firewall: Add more rules to input/output when adding rules to forward

The special_input/output_targets array assumed that firewall access
will always be denied. However, rules also need to be created when
access is granted. Therefore the ACCEPT target needs to be included
in this list and rules must be created in INPUTFW/OUTGOINGFW too
when ACCEPT rules are created in FORWARDFW.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2019-04-30 10:45:34 +01:00
parent 68e0cf6714
commit ae93dd3deb

View File

@@ -175,9 +175,9 @@ sub buildrules {
}
if ($POLICY_INPUT_ACTION eq "DROP") {
push(@special_input_targets, "REJECT");
push(@special_input_targets, ("ACCEPT", "REJECT"));
} elsif ($POLICY_INPUT_ACTION eq "REJECT") {
push(@special_input_targets, "DROP");
push(@special_input_targets, ("ACCEPT", "DROP"));
}
my @special_output_targets = ();
@@ -187,9 +187,9 @@ sub buildrules {
push(@special_output_targets, "ACCEPT");
if ($POLICY_OUTPUT_ACTION eq "DROP") {
push(@special_output_targets, "REJECT");
push(@special_output_targets, ("ACCEPT", "REJECT"));
} elsif ($POLICY_OUTPUT_ACTION eq "REJECT") {
push(@special_output_targets, "DROP");
push(@special_output_targets, ("ACCEPT", "DROP"));
}
}