summaryrefslogtreecommitdiffstats
path: root/lib/network/shorewall.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-03-26 15:01:18 +0000
committerOlivier Blin <oblin@mandriva.com>2008-03-26 15:01:18 +0000
commitec022f4282e96546842fb47b82483321c6fef472 (patch)
treef1436cb0e5499a75032e6625f50b3d95d7202154 /lib/network/shorewall.pm
parent6bc0e163a424b06347b49f4b740d4ef3bb4fd4ff (diff)
downloaddrakx-net-ec022f4282e96546842fb47b82483321c6fef472.tar
drakx-net-ec022f4282e96546842fb47b82483321c6fef472.tar.gz
drakx-net-ec022f4282e96546842fb47b82483321c6fef472.tar.bz2
drakx-net-ec022f4282e96546842fb47b82483321c6fef472.tar.xz
drakx-net-ec022f4282e96546842fb47b82483321c6fef472.zip
allow to accept local users for specific ports
Diffstat (limited to 'lib/network/shorewall.pm')
-rw-r--r--lib/network/shorewall.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/network/shorewall.pm b/lib/network/shorewall.pm
index fc19c92..de22d75 100644
--- a/lib/network/shorewall.pm
+++ b/lib/network/shorewall.pm
@@ -94,6 +94,7 @@ sub read {
map { "$_/$e->[3]" } split(',', $e->[4]);
} grep { $_->[0] eq 'ACCEPT' && $_->[1] eq 'net' } @rules),
);
+ $conf{accept_local_user}{$_->[4]} = $_->[8] foreach grep { $_->[0] eq 'ACCEPT+' } @rules;
$conf{redirects}{$_->[3]}{$_->[4]} = $_->[2] foreach grep { $_->[0] eq 'REDIRECT' } @rules;
if (my ($e) = get_config_file('masq')) {
@@ -184,6 +185,10 @@ What do you want to do?"),
if_($use_pptp, [ 'ACCEPT', 'fw', 'loc:10.0.0.138', 'tcp', '1723' ]),
if_($use_pptp, [ 'ACCEPT', 'fw', 'loc:10.0.0.138', 'gre' ]),
(map_each { [ 'ACCEPT', 'net', 'fw', $::a, join(',', @$::b), '-' ] } %$ports_by_proto),
+ (map_each {
+ print "b: $::b\n";
+ if_($::b, [ 'ACCEPT+', 'fw', 'net', 'tcp', $::a, '-', '-', '-', $::b ]);
+ } %{$conf->{accept_local_user}}),
(map {
#- WARNING: won't redirect ports from the firewall system if a local zone exists
map_each {