public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: Michael Tremer <michael.tremer@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: [PATCH] OpenVPN: Add start of static routes in client N2N
Date: Tue, 01 Dec 2020 16:32:49 +0000	[thread overview]
Message-ID: <714AC867-73A5-44C5-8A33-6FCBE9717C12@ipfire.org> (raw)
In-Reply-To: <4c069fa683f6b245ae69d90e4f64eab6a4b9e1a1.camel@ipfire.org>

[-- Attachment #1: Type: text/plain, Size: 4002 bytes --]

Hi,

interesting. We should have seen this before then because this parameter was added to the configuration file ages ago.

Is there a chance that OpenVPN has changed the parameters those scripts are called with?

No matter what, we will need a wrapper script that will accept all those parameters, probably not care much about them and then call /etc/init.d/static-routes.

I will revert the patch for now then, so that we have some time to work on a solution.

Best,
-Michael

> On 26 Nov 2020, at 11:13, ummeegge <ummeegge(a)ipfire.org> wrote:
> 
> Hi all,
> during some testings with N2N ciphers, i recognized a strange behavior
> with this patch, the 'up /etc/init.d/static-routes start' command but
> only with client connections. The complete network went down while
> starting the connection and nothing was reachable anymore. The last
> line in messages was 
> 
> Nov 25 23:53:21 ipfire-prime testcryptn2n[12261]: /etc/init.d/static-
> routes start tun1 1500 1573 10.123.123.2 10.123.123.1 init
> 
> and from there on the screen freezes. The WUI was not reachable anymore
> and SSH delivers a
> 
> ssh: connect to host 192.168.123.1 port 222: No route to host
> 
> have had no problems with the N2N TLS-Server which starts without
> problems but the N2N TLS-Client crashed, even if no static route has
> been defined, the whole network/routing.
> 
> Am not sure what causes this but i would strongly recommend to revert
> this patch from origin/next !!!
> 
> May someone else can check this patch too ?
> 
> Best regards,
> 
> Erik
> 
> 
> Am Mittwoch, den 11.11.2020, 18:12 +0000 schrieb ummeegge:
>> Fixes: #12529
>> 
>> - If a client N2N configuration will be imported into IPFire systems,
>> a line will be added which calls the --up script to restart the
>> static route initscript. Since this is IPFire specific, i will only
>> be
>> added via import on IPFire system.
>> - Deleted unneeded line in CLIENTCONF section.
>> - Added description to SERVERCONF section.
>> 
>> Signed-off-by: ummeegge <erik.kapfer(a)ipfire.org>
>> ---
>>  html/cgi-bin/ovpnmain.cgi | 8 +++++++-
>>  1 file changed, 7 insertions(+), 1 deletion(-)
>> 
>> diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi
>> index 8626a94ca..44cb48996 100644
>> --- a/html/cgi-bin/ovpnmain.cgi
>> +++ b/html/cgi-bin/ovpnmain.cgi
>> @@ -953,6 +953,7 @@ unless(-d
>> "${General::swroot}/ovpn/n2nconf/$cgiparams{'NAME'}"){mkdir
>> "${General
>>    print SERVERCONF "ifconfig $ovsubnet.1 $ovsubnet.2\n"; 
>>    print SERVERCONF "# Client Gateway Network\n"; 
>>    print SERVERCONF "route $remsubnet[0] $remsubnet[1]\n";
>> +  print SERVERCONF "# Call up script for static routes\n";
>>    print SERVERCONF "up \"/etc/init.d/static-routes start\"\n";
>>    print SERVERCONF "# tun Device\n"; 
>>    print SERVERCONF "dev tun\n"; 
>> @@ -1052,7 +1053,6 @@ unless(-d
>> "${General::swroot}/ovpn/n2nconf/$cgiparams{'NAME'}"){mkdir
>> "${General
>>    print CLIENTCONF "ifconfig $ovsubnet.2 $ovsubnet.1\n"; 
>>    print CLIENTCONF "# Server Gateway Network\n"; 
>>    print CLIENTCONF "route $remsubnet[0] $remsubnet[1]\n"; 
>> -  print CLIENTCONF "up \"/etc/init.d/static-routes start\"\n";
>>    print CLIENTCONF "# tun Device\n"; 
>>    print CLIENTCONF "dev tun\n"; 
>>    print CLIENTCONF "#Logfile for statistics\n";
>> @@ -3333,6 +3333,12 @@ END
>>         print FILE "status /var/run/openvpn/$n2nname[0]-n2n 10\n";
>>         close FILE;
>>  
>> +       # Add static route command to client configuration
>> +       open(FILE, ">> $tempdir/$uplconffilename") or die 'Unable to
>> open config file.';
>> +       print FILE "# Call up script for static routes\n";
>> +       print FILE "up \"/etc/init.d/static-routes start\"\n";
>> +       close FILE;
>> +
>>         move("$tempdir/$uplconffilename",
>> "${General::swroot}/ovpn/n2nconf/$n2nname[0]/$uplconffilename2");
>>  
>>         if ($? ne 0) {
> 
> 


      reply	other threads:[~2020-12-01 16:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-11 18:12 ummeegge
2020-11-26 11:13 ` ummeegge
2020-12-01 16:32   ` Michael Tremer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=714AC867-73A5-44C5-8A33-6FCBE9717C12@ipfire.org \
    --to=michael.tremer@ipfire.org \
    --cc=development@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox