Commit Graph

18959 Commits

Author SHA1 Message Date
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
Timo Eissler
10b32d3895 ovpnmain.cgi: Fix OTP secret handling
Convert stored hex OTP secret to binary prior to converting to base32.
2022-06-17 10:20:19 +00:00
Timo Eissler
16d4a5c264 ovpnmain.cgi: Fix comparison operators 2022-06-17 10:20:18 +00:00
Michael Tremer
a999886759 openvpn-2fa: Configure fake authentication credentials
These configuration option are required to make the client authenticate
itself against the server.

The server may then accept those credentials without any further ado or
ask for a OTP.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-06-17 10:20:18 +00:00
Michael Tremer
5111dc3df3 openvpn-2fa: Enable management socket for RW server
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-06-17 10:20:18 +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
Michael Tremer
c63a54f090 ovpnmain.cgi: Load all modules at the beginning
Although Perl modules tend to take a long time to load, it is better to
do this at the beginning so that loading the script will show any
errors.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-06-17 10:20:18 +00:00
Michael Tremer
2050be20e1 ovpnmain.cgi: Disable sending any error messages to the browser again
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-06-17 10:20:18 +00:00
Michael Tremer
f27d021470 openpvn-2fa: Fix rootfiles
Some rootfiles where in the wrong location, some others had some
architecture hard-coded.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-06-17 10:20:18 +00:00
Michael Tremer
4b519aa8b0 perl-YAML-Tiny: Update checksum and remove unnecessary fields
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-06-17 10:20:18 +00:00
Michael Tremer
2d44871aa1 perl-Module-ScanDeps: Update checksum and remove unnecessary fields
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-06-17 10:20:18 +00:00
Michael Tremer
6ede67fb5a perl-Module-Install: Update checksum and remove unnecessary fields
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-06-17 10:20:18 +00:00
Michael Tremer
d7772284a1 perl-Module-Build: Update checksum and remove unnecessary fields
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-06-17 10:20:18 +00:00
Michael Tremer
89bdc5563c perl-MIME-Base32: Update checksum and remove unnecessary fields
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-06-17 10:20:18 +00:00
Michael Tremer
4f3f7f5784 perl-Imager-QRCode: Update checksum and remove unnecessary fields
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-06-17 10:20:17 +00:00
Michael Tremer
42a2a93911 perl-Imager: Update checksum and remove unnecessary fields
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-06-17 10:20:17 +00:00
Michael Tremer
aeff5e3fee perl-File-Remove: Update checksum and drop unnecessary fields
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-06-17 10:20:17 +00:00
Michael Tremer
baf62b83cb oauth-toolkit: Update checksum and drop unnecessary fields
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-06-17 10:20:17 +00:00
Michael Tremer
e0fa8c25e8 qrencode: Rename package and update checksum
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-06-17 10:20:17 +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
Timo Eissler
dc124917e3 perl-MIME-Base32: New package
Base32 encoder and decoder

Signed-off-by: Timo Eissler <timo.eissler@ipfire.org>
2022-06-17 10:20:17 +00:00
Timo Eissler
e97759c292 perl-Imager-QRCode: New package
Generate QR Code with Imager using libqrencode

Signed-off-by: Timo Eissler <timo.eissler@ipfire.org>
2022-06-17 10:20:17 +00:00
Timo Eissler
bc8bea129c perl-Imager: New package
Perl extension for Generating 24 bit Images

Required by perl-Imager-QRCode.

Signed-off-by: Timo Eissler <timo.eissler@ipfire.org>
2022-06-17 10:20:17 +00:00
Timo Eissler
cb36c0929c perl-Module-Install: New package
Module::Install configuration system

Required by perl-Imager-QRCode.

Signed-off-by: Timo Eissler <timo.eissler@ipfire.org>
2022-06-17 10:20:17 +00:00
Timo Eissler
3aeadfd8bd perl-YAML-Tiny: New package
Read/Write YAML files with as little code as possible

Required by perl-Module-Install.

Signed-off-by: Timo Eissler <timo.eissler@ipfire.org>
2022-06-17 10:20:17 +00:00
Timo Eissler
bfc889a70a perl-Module-ScanDeps: New package
Recursively scan Perl code for dependencies

Required by perl-Module-Install.

Signed-off-by: Timo Eissler <timo.eissler@ipfire.org>
2022-06-17 10:20:17 +00:00
Timo Eissler
a102cdbae1 perl-Module-Build: New package
Build and install Perl modules

Required by perl-Module-Install.

Signed-off-by: Timo Eissler <timo.eissler@ipfire.org>
2022-06-17 10:20:17 +00:00
Timo Eissler
6f8b1c534e perl-File-Remove: New package
Remove files and directories

Required by perl-Module-Install.

Signed-off-by: Timo Eissler <timo.eissler@ipfire.org>
2022-06-17 10:20:17 +00:00
Timo Eissler
3780b7a4ac libqrcode: New package
A fast and compact QR Code encoding library.

Homepage: https://fukuchi.org/works/qrencode/
Source: https://fukuchi.org/works/qrencode/qrencode-4.1.1.tar.gz

Signed-off-by: Timo Eissler <timo.eissler@ipfire.org>
2022-06-17 10:20:16 +00:00
Timo Eissler
7e4af6eb54 oath-toolkit: New package
OATH Toolkit provide components to build one-time password
authentication systems.

Homepage: https://www.nongnu.org/oath-toolkit/index.html
Source: https://download.savannah.nongnu.org/releases/oath-toolkit/oath-toolkit-2.6.7.tar.gz

Signed-off-by: Timo Eissler <timo.eissler@ipfire.org>
2022-06-17 10:20:14 +00:00
Peter Müller
0ffba7d4f6 linux: Update to 5.15.48
Please refer to https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.48
for the changelog of this version.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-06-17 06:59:50 +00:00
Peter Müller
961e253e1a Core Update 169: Ship bind
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-06-17 06:56:05 +00:00
Matthias Fischer
07bd97edf7 bind: Update to 9.16.30
For details see:
https://downloads.isc.org/isc/bind9/9.16.30/doc/arm/html/notes.html#notes-for-bind-9-16-30

"Bug Fixes

    The fetches-per-server quota is designed to adjust itself downward
    automatically when an authoritative server times out too frequently.
    Due to a coding error, that adjustment was applied incorrectly,
    so that the quota for a congested server was always set to 1. This
    has been fixed. [GL #3327]

    DNSSEC-signed catalog zones were not being processed correctly. This
    has been fixed. [GL #3380]

    Key files were updated every time the dnssec-policy key manager ran,
    whether the metadata had changed or not. named now checks whether
    changes were applied before writing out the key files. [GL #3302]"

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
2022-06-17 06:55:37 +00:00
Michael Tremer
bf7bfc3df6 dnsdist: Update to 1.7.2
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
2022-06-15 15:41:25 +00:00
Peter Müller
f391d8628b linux-firmware: Update to 20220610
No changelog is provided, please refer to
https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/
for all activity since the previous version.

This patch includes necessary directives for shipping added or modified
firmware files with Core Update 169, and deleting appropriate files on
existing installations.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
2022-06-13 20:49:00 +00:00
Peter Müller
310ad69dc1 lynis: Update to 3.0.8
Full changelog as retrived from https://cisofy.com/changelog/lynis/#308:

- MALW-3274 - Detect McAfee VirusScan Command Line Scanner
- PKGS-7346 Check Alpine Package Keeper (apk)
- PKGS-7395 Check Alpine upgradeable packages
- EOL for Alpine Linux 3.14 and 3.15

- AUTH-9408 - Check for pam_faillock as well (replacement for pam_tally2)
- FILE-7524 - Test enhanced to support symlinks
- HTTP-6643 - Support ModSecurity version 2 and 3
- KRNL-5788 - Only run relevant tests and improved logging
- KRNL-5820 - Additional path for security/limits.conf
- KRNL-5830 - Check for /var/run/needs_restarting (Slackware)
- KRNL-5830 - Add a presence check for /boot/vmlinuz
- PRNT-2308 - Bugfix that prevented test from storing values correctly
- Extended location of PAM files for AARCH64
- Some messages in log improved

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-06-13 20:46:58 +00:00
Peter Müller
d819a62b14 linux: Update rootfiles
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-06-13 20:45:51 +00:00
Peter Müller
c0c8a08992 linux: Run make oldconfig for x86_64
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-06-13 20:42:07 +00:00
Peter Müller
6d084eb8b1 xfsprogs: Fix rootfile
For some reason, this particular file's name always comprises of x86_64.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-06-13 20:36:13 +00:00
Peter Müller
d462422cc3 Core Update 169: Ship tzdata
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-06-13 15:52:19 +00:00
Peter Müller
0371726e94 tzdata: Update to 2022a
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-06-13 15:52:06 +00:00
Peter Müller
80745fb58f unbound.conf: Aggressive NSEC is enabled by default since Unbound 1.15.0
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-06-13 15:50:10 +00:00
Peter Müller
0360d235c8 Core Update 169: Ship and apply sysctl changes
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-06-13 15:49:40 +00:00
Peter Müller
84d6e93150 sysctl: For the sake of completeness, do not accept IPv6 redirects
While IPFire 2.x' web interface does not support IPv6, users can
technically run it with IPv6 by conducting the necessary configuration
changes manually.

To provide these systems as well, we should disable acceptance of ICMPv6
redirect packets - which is apparently not default in Linux, yet. :-/

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
2022-06-13 15:48:45 +00:00