summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/network/shorewall.pm11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/network/shorewall.pm b/lib/network/shorewall.pm
index d0daca4..136656c 100644
--- a/lib/network/shorewall.pm
+++ b/lib/network/shorewall.pm
@@ -209,6 +209,17 @@ What do you want to do?"),
}
}
+sub set_redirected_ports {
+ my ($conf, $proto, $dest, @ports) = @_;
+ if (@ports) {
+ $conf->{redirects}{$proto}{$_} = $dest foreach @ports;
+ } else {
+ my $r = $conf->{redirects}{$proto};
+ @ports = grep { $r->{$_} eq $dest } keys %$r;
+ delete $r->{$_} foreach @ports;
+ }
+}
+
sub update_interfaces_list {
my ($o_intf) = @_;
$o_intf && member($o_intf, map { $_->[1] } get_config_file('interfaces')) and return;