mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-15 04:04:10 +01:00
Fix openvpnserver handling
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6242 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
21a71d7b64
commit
cad5d896d3
@ -177,7 +177,11 @@ sub setup_tunnels() {
|
||||
$port = $p;
|
||||
$protocol = $proto;
|
||||
} elsif ( $proto ) {
|
||||
$protocol = $proto;
|
||||
if ( "\L$proto" =~ /udp|tcp/ ) {
|
||||
$protocol = $proto;
|
||||
} else {
|
||||
$port = $proto;
|
||||
}
|
||||
}
|
||||
|
||||
add_rule $inchainref, "-p $protocol $source --dport $port -j ACCEPT";
|
||||
@ -214,17 +218,17 @@ sub setup_tunnels() {
|
||||
my $dest = match_dest_net $gateway;
|
||||
|
||||
my %tunneltypes = ( 'ipsec' => { function => \&setup_one_ipsec , params => [ $kind, $source, $dest , $gatewayzones ] } ,
|
||||
'ipsecnat' => { function => \&setup_one_ipsec , params => [ $kind, $source, $dest , $gatewayzones ] } ,
|
||||
'ipip' => { function => \&setup_one_other, params => [ $source, $dest , 4 ] } ,
|
||||
'gre' => { function => \&setup_one_other, params => [ $source, $dest , 47 ] } ,
|
||||
'6to4' => { function => \&setup_one_other, params => [ $source, $dest , 41 ] } ,
|
||||
'pptpclient' => { function => \&setup_pptp_client, params => [ $kind, $source, $dest ] } ,
|
||||
'pptpserver' => { function => \&setup_pptp_server, params => [ $kind, $source, $dest ] } ,
|
||||
'openvpn' => { function => \&setup_one_openvpn, params => [ $kind, $source, $dest ] } ,
|
||||
'openvpnclient' => { function => \&setup_one_openvpn_client, params => [ $kind, $source, $dest ] } ,
|
||||
'openvpnserver' => { function => \&setup_one_openvpn_server, params => [ $kind, $source, $dest ] } ,
|
||||
'generic' => { function => \&setup_one_generic , params => [ $kind, $source, $dest ] } ,
|
||||
);
|
||||
'ipsecnat' => { function => \&setup_one_ipsec , params => [ $kind, $source, $dest , $gatewayzones ] } ,
|
||||
'ipip' => { function => \&setup_one_other, params => [ $source, $dest , 4 ] } ,
|
||||
'gre' => { function => \&setup_one_other, params => [ $source, $dest , 47 ] } ,
|
||||
'6to4' => { function => \&setup_one_other, params => [ $source, $dest , 41 ] } ,
|
||||
'pptpclient' => { function => \&setup_pptp_client, params => [ $kind, $source, $dest ] } ,
|
||||
'pptpserver' => { function => \&setup_pptp_server, params => [ $kind, $source, $dest ] } ,
|
||||
'openvpn' => { function => \&setup_one_openvpn, params => [ $kind, $source, $dest ] } ,
|
||||
'openvpnclient' => { function => \&setup_one_openvpn_client, params => [ $kind, $source, $dest ] } ,
|
||||
'openvpnserver' => { function => \&setup_one_openvpn_server, params => [ $kind, $source, $dest ] } ,
|
||||
'generic' => { function => \&setup_one_generic , params => [ $kind, $source, $dest ] } ,
|
||||
);
|
||||
|
||||
$kind = "\L$kind";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user