summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Grad <florin@mandriva.com>2003-02-20 17:50:23 +0000
committerFlorin Grad <florin@mandriva.com>2003-02-20 17:50:23 +0000
commit24a236385ea3ddea1eac867906ae74bbc05dfb07 (patch)
tree561b47771a60825c2048206bf7ebb8c78067f01c
parent8c569cd85c1e8ec628136177e6831514b7d6c9e9 (diff)
downloaddrakx-24a236385ea3ddea1eac867906ae74bbc05dfb07.tar
drakx-24a236385ea3ddea1eac867906ae74bbc05dfb07.tar.gz
drakx-24a236385ea3ddea1eac867906ae74bbc05dfb07.tar.bz2
drakx-24a236385ea3ddea1eac867906ae74bbc05dfb07.tar.xz
drakx-24a236385ea3ddea1eac867906ae74bbc05dfb07.zip
update 2 rules for the pptp dsl internet connection
-rw-r--r--perl-install/network/shorewall.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/perl-install/network/shorewall.pm b/perl-install/network/shorewall.pm
index 6f01bca0a..ebed44ffe 100644
--- a/perl-install/network/shorewall.pm
+++ b/perl-install/network/shorewall.pm
@@ -2,7 +2,7 @@ package network::shorewall; # $Id$
-use strict;
+
use detect_devices;
use network::netconnect;
use run_program;
@@ -86,6 +86,7 @@ sub read {
sub write {
my ($conf) = @_;
+ my $connect_file = "/etc/sysconfig/network-scripts/net_cnx_up";
my %ports_by_proto;
foreach (split ' ', $conf->{ports}) {
@@ -111,11 +112,13 @@ sub write {
[ 'all', 'all', 'REJECT', 'info' ],
);
set_config_file('rules',
+ if_(cat_("$prefix$connect_file") =~ /pptp/, [ 'ACCEPT', 'fw', 'loc:10.0.0.138', 'tcp', '1723' ]),
+ if_(cat_("$prefix$connect_file") =~ /pptp/, [ 'ACCEPT', 'fw', 'loc:10.0.0.138', 'gre' ]),
(map {
map_each { [ 'ACCEPT', $_, 'fw', $::a, join(',', @$::b), '-' ] } %ports_by_proto
} ('net', if_($conf->{masquerade}, 'masq'), if_($conf->{loc_interface}, 'loc'))),
if_($conf->{masquerade}, map { [ 'ACCEPT', 'masq', 'fw', $_, join(',', @drakgw_ports), '-' ] } 'tcp', 'udp'),
- if_($conf->{masquerade}, map { [ 'ACCEPT', 'fw', 'masq', $_, join(',', @internal_ports), '-' ] } 'tcp', 'udp'),
+ if_($conf->{masquerade}, map { [ 'ACCEPT', 'fw', 'masq', $_, join(',', @internal_ports), '-' ] } 'tcp', 'udp'),
);
set_config_file('masq',
$conf->{masquerade} ? [ $conf->{net_interface}, $conf->{masquerade}{subnet} ] : (),