From 6bc0e163a424b06347b49f4b740d4ef3bb4fd4ff Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Wed, 26 Mar 2008 14:50:21 +0000 Subject: redirect ports from the firewall system if no local zone exists --- lib/network/shorewall.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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} ])); -- cgit v1.2.1