diff -Nur -x '*.orig' -x '*.rej' smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/10dev mezzanine_patched_smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/10dev --- smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/10dev 2008-12-03 14:34:53.000000000 +0100 +++ mezzanine_patched_smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/10dev 2010-10-19 09:32:32.000000000 +0200 @@ -1,20 +1,23 @@ # Virtual Interface Configuration { - my $OUT=''; - my $protocol = ${'openvpn-bridge'}{protocol} || 'udp'; - my $port=''; - if ($protocol eq 'udp'){ - $port = ${'openvpn-bridge'}{UDPPort} || '1194'; - } - if ($protocol eq 'tcp'){ - $port = ${'openvpn-bridge'}{TCPPort} || '1194'; - $protocol = 'tcp-server'; - } - my $tapIf = ${'openvpn-bridge'}{tapIf} || 'tap0'; - - $OUT .= "port $port\n"; + my $OUT=''; + my $protocol = ${'openvpn-bridge'}{protocol} || 'udp'; + my $port=''; + if ($protocol eq 'udp'){ + $port = ${'openvpn-bridge'}{UDPPort} || '1194'; + } + if ($protocol eq 'tcp'){ + $port = ${'openvpn-bridge'}{TCPPort} || '1194'; + $protocol = 'tcp-server'; + } + my $tapIf = ${'openvpn-bridge'}{tapIf} || 'tap0'; + +$OUT .=<<"HERE"; + +port $port +proto $protocol +dev $tapIf + +HERE - $OUT .= "proto $protocol\n"; - $OUT .= "dev $tapIf\n"; - $OUT .= ''; } diff -Nur -x '*.orig' -x '*.rej' smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/30cert mezzanine_patched_smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/30cert --- smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/30cert 2008-12-10 00:15:12.000000000 +0100 +++ mezzanine_patched_smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/30cert 2010-10-19 09:29:55.000000000 +0200 @@ -3,15 +3,14 @@ ca pub/cacert.pem cert pub/cert.pem key priv/key.pem +tls-server { -if (-e "/etc/openvpn/bridge/priv/takey.pem" && !-z "/etc/openvpn/bridge/priv/takey.pem"){ - $OUT .=<<"END"; -tls-server -tls-auth priv/takey.pem 0 -END -} +$OUT .= "tls-auth priv/takey.pem 0\n" if + (-e "/etc/openvpn/bridge/priv/takey.pem" && + !-z "/etc/openvpn/bridge/priv/takey.pem"); + } # CRL file for certificates verification diff -Nur -x '*.orig' -x '*.rej' smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/40userAuth mezzanine_patched_smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/40userAuth --- smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/40userAuth 2010-10-19 09:39:57.000000000 +0200 +++ mezzanine_patched_smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/40userAuth 2010-10-19 09:33:42.000000000 +0200 @@ -1,11 +1,11 @@ # Plugin for user-auth { - my $userAuth = ${'openvpn-bridge'}{userAuth} || 'CrtWithPass'; - if ($userAuth eq 'CrtWithPass'){ - my $plugin_dir = (-d "/usr/share/openvpn/plugin/lib") ? - '/usr/share/openvpn/plugin/lib':'/usr/lib/openvpn/plugin/lib'; - $OUT .= "plugin ".$plugin_dir."/openvpn-auth-pam.so login\n"; - } + my $userAuth = ${'openvpn-bridge'}{userAuth} || 'CrtWithPass'; + if ($userAuth eq 'CrtWithPass'){ + my $plugin_dir = (-d "/usr/share/openvpn/plugin/lib") ? + '/usr/share/openvpn/plugin/lib':'/usr/lib/openvpn/plugin/lib'; + $OUT .= "plugin ".$plugin_dir."/openvpn-auth-pam.so login\n"; + } $OUT .= ''; } diff -Nur -x '*.orig' -x '*.rej' smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/50server_mode mezzanine_patched_smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/50server_mode --- smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/50server_mode 2007-01-29 15:07:46.000000000 +0100 +++ mezzanine_patched_smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/50server_mode 2010-10-19 09:34:25.000000000 +0200 @@ -1,9 +1,9 @@ # Server mode { - my $OUT = ''; - my $ip = $LocalIP; - my $netmask = $LocalNetmask; - my $min = ${'openvpn-bridge'}{startPool}; - my $max = ${'openvpn-bridge'}{endPool}; - $OUT = "server-bridge $ip $netmask $min $max\n"; + my $OUT = ''; + my $ip = $LocalIP; + my $netmask = $LocalNetmask; + my $min = ${'openvpn-bridge'}{startPool} || ''; + my $max = ${'openvpn-bridge'}{endPool} || ''; + $OUT = "server-bridge $ip $netmask $min $max\n"; } diff -Nur -x '*.orig' -x '*.rej' smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/60options mezzanine_patched_smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/60options --- smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/60options 2010-10-19 09:39:57.000000000 +0200 +++ mezzanine_patched_smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/60options 2010-10-19 09:37:41.000000000 +0200 @@ -11,13 +11,13 @@ use esmith::NetworksDB; my $ndb = esmith::NetworksDB->open_ro() || - die('Can not open Networks DB'); + die('Can not open Networks DB'); my @networks = $ndb->networks(); if ($proto eq 'tcp'){ - $mtuTest = 'disabled'; - $fragment = ''; + $mtuTest = 'disabled'; + $fragment = ''; } $OUT .=<<"HERE"; @@ -29,43 +29,41 @@ HERE foreach my $network (@networks) { - if ($network->prop('Router')) { - $OUT .= sprintf("push \"route %s %s %s\"\n", - $network->key(), - $network->prop('Mask'), - $network->prop('Router') - ); - } - + if ($network->prop('Router')) { + $OUT .= sprintf("push \"route %s %s %s\"\n", + $network->key(), + $network->prop('Mask'), + $network->prop('Router') + ); + } } -if ($redirectGW eq 'allways'){ - $OUT .= "push \"redirect-gateway def1\"\n"; +if ($redirectGW eq 'always'){ + $OUT .= "push \"redirect-gateway def1\"\n"; } if ($mtuTest eq 'enabled'){ - $OUT .= "mtu-test\n"; + $OUT .= "mtu-test\n"; } elsif (($mtuTest eq 'disabled')){ - if ($tunMtu ne ''){ - $OUT .= "tun-mtu $tunMtu\n"; - } - if (($proto eq 'udp') && ($fragment ne '')){ - $OUT .= "fragment $fragment\nmssfix\n"; - } + if ($tunMtu ne ''){ + $OUT .= "tun-mtu $tunMtu\n"; + } + if (($proto eq 'udp') && ($fragment ne '')){ + $OUT .= "fragment $fragment\nmssfix\n"; + } } if ($cipher ne 'auto'){ - $OUT .= "cipher $cipher\n"; + $OUT .= "cipher $cipher\n"; } if ($duplicate eq 'enabled'){ - $OUT .= "duplicate-cn\n"; + $OUT .= "duplicate-cn\n"; } } -reneg-sec 3600 nice 5 passtos diff -Nur -x '*.orig' -x '*.rej' smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/70management mezzanine_patched_smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/70management --- smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/70management 2008-12-03 15:51:59.000000000 +0100 +++ mezzanine_patched_smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/70management 2010-10-19 09:38:46.000000000 +0200 @@ -1,10 +1,7 @@ # Management interface { - my $management = ${'openvpn-bridge'}{'management'} || 'localhost:11194:password'; - my @param = split(/:/,$management); - my $host = $param[0]; - my $port = $param[1]; - my $pass = $param[2]; + my $management = ${'openvpn-bridge'}{'management'} || 'localhost:11194:password'; + my ($host,$port,$pass) = split(/:/,$management); $OUT ="management $host $port management-pass.txt\n"; } diff -Nur -x '*.orig' -x '*.rej' smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/80clients mezzanine_patched_smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/80clients --- smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/80clients 2010-10-19 09:39:57.000000000 +0200 +++ mezzanine_patched_smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/80clients 2010-10-19 09:39:36.000000000 +0200 @@ -1,27 +1,27 @@ # Clients options { - my $OUT = ''; - my $maxClient = ${'openvpn-bridge'}{maxClients} || '20'; - my $clientToClient = ${'openvpn-bridge'}{clientToClient} || 'disabled'; - my $compLzo = ${'openvpn-bridge'}{compLzo} || 'enabled'; - my $configRequired = ${'openvpn-bridge'}{ConfigRequired} || 'disabled'; + my $OUT = ''; + my $maxClient = ${'openvpn-bridge'}{maxClients} || '20'; + my $clientToClient = ${'openvpn-bridge'}{clientToClient} || 'disabled'; + my $compLzo = ${'openvpn-bridge'}{compLzo} || 'enabled'; + my $configRequired = ${'openvpn-bridge'}{ConfigRequired} || 'disabled'; - if ($clientToClient eq 'enabled'){ - $OUT .= "client-to-client\n"; - } + if ($clientToClient eq 'enabled'){ + $OUT .= "client-to-client\n"; + } - $OUT .= "client-config-dir ccd\n"; + $OUT .= "client-config-dir ccd\n"; - if ($configRequired eq 'enabled'){ - $OUT .= 'ccd-exclusive\n'; - } + if ($configRequired eq 'enabled'){ + $OUT .= 'ccd-exclusive\n'; + } - $OUT .= "max-clients $maxClient\n"; + $OUT .= "max-clients $maxClient\n"; - if ( $compLzo eq 'enabled'){ - $OUT .= "comp-lzo adaptive\n"; - $OUT .= "push \"comp-lzo adaptive\"\n"; - } - $OUT .= ''; + if ( $compLzo eq 'enabled'){ + $OUT .= "comp-lzo adaptive\n"; + $OUT .= "push \"comp-lzo adaptive\"\n"; + } + $OUT .= ''; }