diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-03-26 15:01:18 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-03-26 15:01:18 +0000 |
commit | ec022f4282e96546842fb47b82483321c6fef472 (patch) | |
tree | f1436cb0e5499a75032e6625f50b3d95d7202154 /lib/network/shorewall.pm | |
parent | 6bc0e163a424b06347b49f4b740d4ef3bb4fd4ff (diff) | |
download | drakx-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.pm | 5 |
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 { |