summaryrefslogtreecommitdiffstats
path: root/lib/network
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-03-26 14:50:21 +0000
committerOlivier Blin <oblin@mandriva.com>2008-03-26 14:50:21 +0000
commit6bc0e163a424b06347b49f4b740d4ef3bb4fd4ff (patch)
tree5a0d359ef3a724d8ea2e68d477912bc4a8c12d2a /lib/network
parent4bae011ce5b573acf0c86e59557b60fbb35b49e4 (diff)
downloaddrakx-net-6bc0e163a424b06347b49f4b740d4ef3bb4fd4ff.tar
drakx-net-6bc0e163a424b06347b49f4b740d4ef3bb4fd4ff.tar.gz
drakx-net-6bc0e163a424b06347b49f4b740d4ef3bb4fd4ff.tar.bz2
drakx-net-6bc0e163a424b06347b49f4b740d4ef3bb4fd4ff.tar.xz
drakx-net-6bc0e163a424b06347b49f4b740d4ef3bb4fd4ff.zip
redirect ports from the firewall system if no local zone exists
Diffstat (limited to 'lib/network')
-rw-r--r--lib/network/shorewall.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/network/shorewall.pm b/lib/network/shorewall.pm
index 3d0caeb..fc19c92 100644
--- a/lib/network/shorewall.pm
+++ b/lib/network/shorewall.pm
@@ -185,7 +185,10 @@ What do you want to do?"),
if_($use_pptp, [ 'ACCEPT', 'fw', 'loc:10.0.0.138', 'gre' ]),
(map_each { [ 'ACCEPT', 'net', 'fw', $::a, join(',', @$::b), '-' ] } %$ports_by_proto),
(map {
- map_each { [ 'REDIRECT', 'loc', $::b, $_, $::a, '-' ] } %{$conf->{redirects}{$_}};
+ #- WARNING: won't redirect ports from the firewall system if a local zone exists
+ map_each {
+ [ 'REDIRECT', $has_loc_zone ? 'loc' : 'fw', $::b, $_, $::a, '-' ]
+ } %{$conf->{redirects}{$_}};
} keys %{$conf->{redirects}}),
));
set_config_file('masq', if_(exists $conf->{masq}, [ $conf->{masq}{net_interface}, $conf->{masq}{subnet} ]));