30 Commits

Author SHA1 Message Date
Michael Tremer
3ee199871b openvpn-authenticator: Break read loop when daemon goes away
Fixes: #12963
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
2023-01-07 21:01:48 +00:00
Michael Tremer
91abc6660a openvpn-authenticator: Avoid infinite loop when losing socket connection
This patch will gracefully terminate the daemon when it loses its
connection to the OpenVPN daemon.

Fixes: #12963
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
2023-01-07 21:01:40 +00:00
Peter Müller
6619aed611 Revert "openvpn-authenticator: Avoid infinite loop when losing socket connection"
This reverts commit 92a9ce54bc.
2022-12-13 15:27:30 +00:00
Peter Müller
6d4110d214 Revert "openvpn-authenticator: Break read loop when daemon goes away"
This reverts commit 7ec3664c32.
2022-12-13 15:26:45 +00:00
Michael Tremer
7ec3664c32 openvpn-authenticator: Break read loop when daemon goes away
Fixes: #12963
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
2022-12-11 11:53:12 +00:00
Michael Tremer
d7618ccba8 openvpn-authenticator: Drop some dead code
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
2022-12-11 11:53:12 +00:00
Michael Tremer
92a9ce54bc openvpn-authenticator: Avoid infinite loop when losing socket connection
This patch will gracefully terminate the daemon when it loses its
connection to the OpenVPN daemon.

Fixes: #12963
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
2022-12-11 11:53:12 +00:00
Michael Tremer
c9dc7fdec0 openvpn-authenticator: Always return general connection data
The function returned different output when TOTP was configured and not
which is not what it should do.

This version will now try to add the TOTP configuration, or will add
nothing it if fails to do so.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-06-17 10:20:19 +00:00
Michael Tremer
b6f9fff2bc openvpn-authenticator: Don't process configuration when row is too short
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-06-17 10:20:19 +00:00
Timo Eissler
59f9e41361 openvpn-authenticator: Change event and environment handling
Move reading of environment in it's own function because not all
events have a ENV block following and thus always reading the ENV
will cause RuntimeError("Unexpected environment line ...").
2022-06-17 10:20:19 +00:00
Timo Eissler
472cd78269 openvpn-authenticator: Fix call of _client_auth_successful 2022-06-17 10:20:19 +00:00
Timo Eissler
a4a42daeea openvpn-authenticator: Return only available data
For connections which have not enabled OTP return
connection name and common_name attributes only.
2022-06-17 10:20:19 +00:00
Timo Eissler
74ab6f9fc0 openvpn-authenticator: Generate TOTP instead of HOTP codes 2022-06-17 10:20:19 +00:00
Michael Tremer
6834749d22 openvpn-2fa: Drop the previous authentication handler
This has been replaced by the newer authenticator

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-06-17 10:20:18 +00:00
Michael Tremer
339b84d509 openvpn-2fa: Import a prototype of an authenticator
This script runs aside of OpenVPN and connects to the management socket.
On the socket, OpenVPN will post any new clients trying to authenticate
which will be handled by the authenticator.

If a client has 2FA enabled, it will be challanged for the current token
which will then be checked in a second pass.

Clients which do not have 2FA enabled will just be authenticated no
matter what and tls-verify will have handled the rest.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-06-17 10:20:18 +00:00
Timo Eissler
e1e10515ec OpenVPN: Add support for 2FA / One-Time Password
Add two-factor authentication (2FA) to OpenVPN host connections with
one-time passwords.

The 2FA can be enabled or disabled per host connection and requires the
client to download it's configuration again after 2FA has beend enabled
for it.
Additionally the client needs to configure an TOTP application, like
"Google Authenticator" which then provides the second factor.
To faciliate this every connection with enabled 2FA
gets an "show qrcode" button after the "show file" button in the
host connection list to show the 2FA secret and an 2FA configuration QRCode.

When 2FA is enabled, the client needs to provide the second factor plus
the private key password (if set) to successfully authorize.

This only supports time based one-time passwords, TOTP with 30s
window and 6 digits, for now but we may update this in the future.

Signed-off-by: Timo Eissler <timo.eissler@ipfire.org>
2022-06-17 10:20:17 +00:00
Erik Kapfer
a946892338 del_rand: Deletion of RAND file in openssl config
Fixes #11943

Since the kernel RNG should do this, there is no need for this anymore.

Signed-off-by: Erik Kapfer <ummeegge@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-01-29 13:49:29 +00:00
Erik Kapfer
e6f7f8e7ba database_attribute: Deliver/create index.txt.attr
Fixes #11904

Since OpenSSL-1.1.0x the database attribute file for IPSec and OpenVPN wasn´t created while initial PKI generation.
OpenVPN delivered an error message but IPSec did crashed within the first attempt.
This problem persists also after X509 deletion and new generation.

index.txt.attr will now be delivered by the system but also deleted and recreated while setting up a new x509.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-01-03 14:52:53 +00:00
Erik Kapfer
bd42f9f968 CRL updater: Update script for OpenVPNs CRL
Update script for OpenVPNs CRL cause OpenVPN refactors the CRL handling since v.2.4.0 .
    Script checks the next update field from the CRL and executes an update before it expires.
    Script is placed under fcron.daily for daily checks.

Signed-off-by: Erik Kapfer <erik.kapfer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-02-11 22:20:28 +00:00
Erik Kapfer
b66b02ab73 OpenVPN: Fix for '--ns-cert-type server is deprecated' .
- Added extended key usage based on RFC3280 TLS rules for OpenVPNs OpenSSL configuration,
so '--remote-cert-tls' can be used instead of the old and deprecated '--ns-cert-type'
if the host certificate are newely generated with this options.
Nevertheless both directives (old and new) will work also with old CAs.

- Automatic detection if the host certificate uses the new options.
If it does, '--remote-cert-tls server' will be automatically set into the client
configuration files for Net-to-Net and Roadwarriors connections.

If it does NOT, the old '--ns-cert-type server' directive will be set in the client
configuration file.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-10-11 11:55:16 +01:00
Michael Tremer
1f99fc9845 openvpn: Fix wrong default port number. 2014-05-13 20:36:58 +02:00
Erik Kapfer
49abe7afb1 OpenVPN:Add HMAC, cipher 'n2n' and DH key selection. Fixes and new design.
Added HMAC algorithm selection menu for N2N and RW.
Added cipher selection menu for N2N connections.
Added DH key selection also for existing installations incl. DH key upload possibility.
Adjusted the ovpn main WUI design to IPSec WUI.
Extend key lenght for CA, cert and control channel with faktor 2.
Some code and typo cleanup.
Bugfixes for #10317, #10149, #10462, #10463
V.2 New changes:
Integrated changes in langs and ovpnmain.cgi until 20.03.2014 2.15-Beta3.
ovpn.cnf have now default bits of 2048 instead of 1024.
ovpn.cnf default_md works now with sha256 instead of md5.
Bugfix: By new installation the auth directive for RWs is faded out #10462 Comment 15.
Added error message if the crl should be displayed but no crl is present.
v.3 New changes #10462 Comment 20:
Updated to core version 77.
Deleted manual name award in DH key upload section, name will be given automatically now.
Added sha512WithRSAEncryption instead of sha1WithRSAEncryption for "Root Certificate".
Added tls-auth support for Roadwarriors.
Added crypto engine support for N2N and Roadwarriors.
2014-05-11 09:24:04 +02:00
Michael Tremer
df6b9ebfbc openvpn: Provide a basic set of configuration settings.
These are the defaults as in the CGI script, but when you don't
set up the roadwarrior server, the configuration file remains
empty and the openvpnctrl binary will end itself because it cannot
read a proper configuration.
2014-02-27 13:32:13 +01:00
Michael Tremer
4176a1bada openvpn: Fix verify script.
Former versions of openvpn called the script where the arguments
in the certificate's common name where separated by /.
Now, those are separated by ", " (comma, space).
2013-12-25 15:12:34 +01:00
Michael Tremer
bfcb3212dc OpenVPN verify: Fix login for RW clients with >= 2 spaces in name.
http://forum.ipfire.org/index.php?topic=8702.0
2013-08-10 11:10:39 +02:00
Michael Tremer
c6556649c6 openvpn: Rewrite the vertificate verify script in perl.
The current shell implementation is not strict with the certificate
common names and does not check all the requirements for the
connection to be accepted.
2013-05-04 22:53:38 +02:00
ms
c6c9630eec Erstmal ein Commit:
OpenVPN zurueck auf den Stand des alten gebracht. Wir bevorzugen die stabile Loesung.
ISDN4K-Utils kompiliert - Noch kein rootfile vorhanden.
Ibod aktualisiert.
Snort-Initscript setzt die Berechtigung der PID auf 644.
libxslt hinzugefuegt - Benoetigt vom mISDN-Script.


git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@623 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2007-06-10 19:10:01 +00:00
ms
e383179bb6 Update:
* Squid 2.5STABLE14 eingepflegt.
Geändert: 
  * xinetd Konfiguration verschoben.
  * OpenVPN Errors behoben. Funktioniert immernoch nicht korrekt. :(
  * Pakfire bearbeitet.
  * Credits erweitert und GPL hinzugefügt.
  * index.cgi, völlig neuer Look.


git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@155 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2006-06-03 20:16:53 +00:00
ms
ed38f89d27 Hinzugefügt:
* AdvancedProxy Fähigkeiten
Geändert:
  * Kleiner Fehler im OpenVPN GUI verblieben und daher behoben.


git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@153 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2006-06-02 19:03:53 +00:00
ms
6e13d0a5c5 Hinzugefügt:
* OpenVPN GUI Alpha7
Geändert:
  * XAMPP von 1.5.3 --> 1.5.3a


git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@152 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
2006-06-02 15:59:39 +00:00