82 Commits

Author SHA1 Message Date
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
Peter Müller
1fe39ef505 httpd: delete comment blocks and unused directives from our configuration
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-04-14 17:20:34 +00:00
Peter Müller
10189aa197 httpd: apply the same security headers on the captive portal instance as we do elsewhere
The Captive Portal should not be framed or leak sensitive detail via
Referrers either.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-04-14 17:20:30 +00:00
Peter Müller
59fa881ea7 httpd: disable sending ETag header completely
These cause caching trouble and pose a potential security risk due to
exposing inode numbers of files within the Apache site directories on an
IPFire machine.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-04-14 17:20:17 +00:00
Peter Müller
a8996f857c httpd: remove compatibility instructions for very old browsers
These are not in use any more - and if they would, we don't support them.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-04-14 17:20:02 +00:00
peter.mueller@ipfire.org
be8afd151f Apache: deny framing of WebUI from different origins
There is no legitimate reason to do this. Setting header X-Frame-Options
to "sameorigin" is necessary for displaying some collectd graphs on the
WebUI.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Acked-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-11-13 19:10:33 +00:00
peter.mueller@ipfire.org
583687a88d Apache: prevent Referrer leaks via WebUI
By default, even modern browsers sent the URL of ther originating
site to another one when accessing hyperlinks. This is an information
leak and may expose internal details (such as FQDN or IP address)
of an IPFire installation to a third party.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Acked-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-11-13 19:09:07 +00:00
peter.mueller@ipfire.org
4636ed66c6 Apache: drop CBC ciphers for WebUI
CBC ciphers contain some known vulnerabilities and should not be used
anymore. While dropping them for OpenSSL clients or public web servers
still causes interoperability problems with legacy setups, they can
be safely removed from IPFire's administrative UI.

This patch changes the used cipersuite to:

TLS_CHACHA20_POLY1305_SHA256 TLSv1.3 Kx=any      Au=any  Enc=CHACHA20/POLY1305(256) Mac=AEAD
TLS_AES_256_GCM_SHA384  TLSv1.3 Kx=any      Au=any  Enc=AESGCM(256) Mac=AEAD
TLS_AES_128_GCM_SHA256  TLSv1.3 Kx=any      Au=any  Enc=AESGCM(128) Mac=AEAD
ECDHE-ECDSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH     Au=ECDSA Enc=AESGCM(256) Mac=AEAD
ECDHE-ECDSA-CHACHA20-POLY1305 TLSv1.2 Kx=ECDH     Au=ECDSA Enc=CHACHA20/POLY1305(256) Mac=AEAD
ECDHE-ECDSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH     Au=ECDSA Enc=AESGCM(128) Mac=AEAD
ECDHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH     Au=RSA  Enc=AESGCM(256) Mac=AEAD
ECDHE-RSA-CHACHA20-POLY1305 TLSv1.2 Kx=ECDH     Au=RSA  Enc=CHACHA20/POLY1305(256) Mac=AEAD
ECDHE-RSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH     Au=RSA  Enc=AESGCM(128) Mac=AEAD

Since TLS 1.3 ciphers will be added automatically by OpenSSL, mentioning
them in "SSLCipherSuite" is unnecessary. ECDSA is preferred over RSA for
performance reasons.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Acked-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-11-13 19:05:54 +00:00
Peter Müller
df62774e32 httpd: prefer AES-GCM ciphers over AES-CBC
CBC ciphers are vulnerable to a bunch of attacks (being
rather academic so far) such as MAC-then-encrypt or
padding oracle.

These seem to be more serious (see
https://blog.qualys.com/technology/2019/04/22/zombie-poodle-and-goldendoodle-vulnerabilities
for further readings) which is why they should be used
for interoperability purposes only.

I plan to remove AES-CBC ciphers for the WebUI at the
end of the year, provided overall security landscape
has not changed until that.

This patch changes the WebUI cipherlist to:
TLS_CHACHA20_POLY1305_SHA256 TLSv1.3 Kx=any      Au=any  Enc=CHACHA20/POLY1305(256) Mac=AEAD
TLS_AES_256_GCM_SHA384  TLSv1.3 Kx=any      Au=any  Enc=AESGCM(256) Mac=AEAD
TLS_AES_128_GCM_SHA256  TLSv1.3 Kx=any      Au=any  Enc=AESGCM(128) Mac=AEAD
ECDHE-ECDSA-CHACHA20-POLY1305 TLSv1.2 Kx=ECDH     Au=ECDSA Enc=CHACHA20/POLY1305(256) Mac=AEAD
ECDHE-ECDSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH     Au=ECDSA Enc=AESGCM(256) Mac=AEAD
ECDHE-ECDSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH     Au=ECDSA Enc=AESGCM(128) Mac=AEAD
ECDHE-RSA-CHACHA20-POLY1305 TLSv1.2 Kx=ECDH     Au=RSA  Enc=CHACHA20/POLY1305(256) Mac=AEAD
ECDHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH     Au=RSA  Enc=AESGCM(256) Mac=AEAD
ECDHE-RSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH     Au=RSA  Enc=AESGCM(128) Mac=AEAD
ECDHE-ECDSA-AES256-SHA384 TLSv1.2 Kx=ECDH     Au=ECDSA Enc=AES(256)  Mac=SHA384
ECDHE-ECDSA-AES128-SHA256 TLSv1.2 Kx=ECDH     Au=ECDSA Enc=AES(128)  Mac=SHA256
ECDHE-RSA-AES256-SHA384 TLSv1.2 Kx=ECDH     Au=RSA  Enc=AES(256)  Mac=SHA384
ECDHE-RSA-AES128-SHA256 TLSv1.2 Kx=ECDH     Au=RSA  Enc=AES(128)  Mac=SHA256

(AES-CBC + ECDSA will be preferred over RSA for performance
reasons. As this cipher order cannot be trivially rebuilt with
OpenSSL cipher stings, it has to be hard-coded.)

All working clients will stay compatible.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-05-17 20:27:41 +01:00
Peter Müller
535dab60d6 httpd: include TLS 1.3 cipher suites
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Cc: Erik Kapfer <erik.kapfer@ipfire.org>
Cc: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-01-17 14:34:00 +00:00
Michael Tremer
63b515dc26 apache: Require TLSv1.2 for access to the web user interface
This will work fine for FF 27 or newer, Chrome 30 or newer,
IE 11 on Windows 7 or newer, Opera 17 or newer, Safari 9 or
newer, Android 5.0 or newer and Java 8 or newer

Since IPFire is not supposed to host any other applications and
all have been removed in the last few Core Updates, only the web
user interface is served over HTTPS here. We clearly prefer
security over compatibility.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-02-28 11:55:35 +00:00
Peter Müller
464426d363 change Apache TLS cipher list to "Mozilla Modern"
Change the TLS cipher list of Apache to "Mozilla Modern".

ECDSA is preferred over RSA to save CPU time on both server
and client. Clients without support for TLS 1.2 and AES will
experience connection failures.

Signed-off-by: Peter Müller <peter.mueller@link38.eu>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-02-28 11:54:08 +00:00
Peter Müller
51bf74a1c8 disable Apache server signature
Sending the server signature is unnecessary and might leak
some internal information (although ServerTokens is already
set to "Prod").

Signed-off-by: Peter Müller <peter.mueller@link38.eu>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-02-21 12:06:02 +00:00
Michael Tremer
91bd66d6d1 Drop PHP
This is no longer needed and in the telephone conference
on Dec 4th, it was decided to drop it.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-01-05 13:37:25 +00:00
Michael Tremer
f3ddea42c6 Drop openmailadmin package
This is EOL upstream for over ten years now and therefore
we cannot continue to support this either.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-12-16 12:33:05 +00:00
Michael Tremer
4d86ce7021 Drop nagios
This is no longer maintained and icinga is available.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-12-16 12:31:47 +00:00
Peter Müller
eb6d71514a prevent loading resources from external sites
Make Apache transmit a CSP (Content Security Policy) header
for WebUI and Captive Portal contents.

This prevents some XSS and content injection attacks, especially
in case no transport encryption (Captive Portal!) can be used.

Signed-off-by: Peter Müller <peter.mueller@link38.eu>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-12-16 12:18:39 +00:00
Peter Müller
0cabaf35c2 prevent IE from interpreting HTML MIME type
Add X-Content-Type-Options header to prevent Internet Explorer
from interpreting the MIME type of a server answer on its own,
which could lead to security risks.

Signed-off-by: Peter Müller <peter.mueller@link38.eu>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-12-16 12:16:12 +00:00
Peter Müller
a57f4a9f5d disable SSL compression and session tickets in Apache
Ensure that Apache never uses SSL compression, which is vulnerable,
and turn off session tickets since the might cause impact to PFS.

Based against next, supersedes first version.

Reported-by: Wolfgang Apolinarski <wolfgang.apolinarski@ipfire.org>
Signed-off-by: Peter Müller <peter.mueller@link38.eu>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-11-20 15:45:52 +00:00
Peter Müller
6c6c1e3f04 redirect to TLS WebUI if authorisation required
Do not allow credentials being submitted in plaintext to Apache.
Instead, redirect the user with a 301 to the TLS version of IPFire's
web interface.

Signed-off-by: Peter Müller <peter.mueller@link38.eu>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-10-18 15:57:57 +01:00
Peter Müller
50846453cb also force TLS when requiring user authentication in WebUI
Force TLS _and_ a valid login when accessing protected directories.

Signed-off-by: Peter Müller <peter.mueller@link38.eu>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-10-11 20:06:27 +01:00
Peter Müller
73ba228620 enable dual-stack ECDSA and RSA certificates in Apache
Note: Apache crashes if any of these files does not exist. Thereof it
is necessary to generate missing keys on existing installations.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-10-11 20:05:37 +01:00
Peter Müller
f227ae4fd2 prefer ECDSA over RSA and remove clutter
Priorize ECDSA before RSA and remove unused cipher suites.
Remove redundant OpenSSL directives to make SSL configuration more readable.

Signed-off-by: Peter Müller <peter.mueller@link38.eu>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-10-11 20:05:16 +01:00
Peter Müller
b0b4d09c56 remove unused dial.cgi directives from Apache vhosts config
Remove configuration lines in Apache vhosts files which
are not used anymore (old dial.cgi stuff).

Signed-off-by: Peter Müller <peter.mueller@link38.eu>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-10-11 11:12:00 +01:00
Michael Tremer
fb96829a74 captive: Update configuration for Apache 2.4
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 19:34:29 +01:00
Michael Tremer
1d68e28753 captive: Do not try to execute the favicon
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 19:00:04 +01:00
Michael Tremer
78148cc1e5 captive: Run apache in HTTP/1.0 mode
Reported-by: Daniel Weismüller <daniel.weismueller@ipfire.org>
Tested-by: Daniel Weismüller <daniel.weismueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 19:00:04 +01:00
Michael Tremer
9b6227cc2a captive: Let apache follow symlinks to load bootstrap
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 19:00:04 +01:00
Michael Tremer
0a02d9bb0c captive-portal: Move CGI files to CGI directory
Previously the assets directory has ExecCGI privileges
which is not at all required and potentially dangerous.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:45 +01:00
Michael Tremer
4ddf453804 captive: Reindent apache configuration
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:45 +01:00
Michael Tremer
a79b220c5a captive: Log into default apache log files
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-22 18:54:45 +01:00
Alexander Marx
8b92078917 Captive-Portal: add web-part
Introduce new Captive-Portal.
Here we add the menu, apache configuration (vhost), IPFire configuration
website and Captive-Portal Access site. Also the languagefiles are
updated.

Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
2017-09-22 18:54:03 +01:00
Wolfgang Apolinarski
d41fe99f74 Update to apache 2.4.27
- Updated to apache 2.4
- Updated the htpasswd generation to use the more secure bcrypt algorithm

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-04 12:40:20 +01:00
Peter Müller
0effbb3569 fix WebUI system information leak
Disable unauthenticated access to cgi-bin/credits.cgi. The page
leaks the currently installed version of IPFire and the hardware
architecture.

Both information might make a successful attack much easier.

This issue can be reproduced by accessing https://[IPFire-IP]:444/cgi-bin/credits.cgi
and accepting a SSL certificate warning (if any).

Signed-off-by: Peter Müller <peter.mueller@link38.eu>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-09-04 12:25:23 +01:00
Michael Tremer
ba2247a4b2 apache only supports MaxClients up to 256
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-04-04 18:59:44 +01:00
Michael Tremer
c016773b98 apache: Allow more processes/connections as the same time
In large networks, when ever multiple clients connect at the
same time and request the proxy.pac configuration file, apache
rate-limited requests so that some clients did not get a response
and therefore could not connect to the Internet.

This allows apache to handle more connections at the same time.

Suggested-by: Thoralf Söldenwagner <soeldenwagner@brecht-schule.hamburg>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-02-28 11:32:08 +00:00
Michael Tremer
3b7d73d1d4 Fix potential HTTPoxy vulnerability
https://httpoxy.org/

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2016-07-19 15:02:16 +01:00
Michael Tremer
afdf148388 Split web-user-interface from apache2 LFS file
It is completely unnecssary to have this in one file
and using options for the LFS is more of a hack than
a solution.
2015-05-05 14:00:20 +02:00
Michael Tremer
261121f1df Remove some left-over files 2015-03-18 15:18:56 +01:00
Michael Tremer
becbf67de7 apache: Do not show loaded modules
The server header will show less information about the
modules of the apache daemon.

Fixes #10671
2015-03-11 15:42:08 +01:00
Michael Tremer
a7006325c0 apache: Disable SSLv3 by default for the IPFire webinterface 2014-10-15 22:55:26 +02:00
Michael Tremer
69776cc42f apache: Update cipher suite that is used for the web user interface.
Taken from here with exception of RC4.
  https://wiki.mozilla.org/Security/Server_Side_TLS#Apache
2014-02-26 15:01:29 +01:00
Michael Tremer
f87161948c apache: Allow accessing sarg reports for admins. 2012-11-26 11:19:51 +01:00
Christian Schmidt
7b9fe2c864 apache: Tuning max spare servers to 10, this should speed up webinterface and updx. 2011-05-23 07:07:13 +02:00
Arne Fitzenreiter
3ae6726a8e Fix ssl-global.conf (settings was ignored). 2011-01-26 17:41:15 +01:00
Christian Schmidt
a4c7687980 Even if the ssl may never be used for this, the entry should be correct. 2010-06-21 22:42:08 +02:00
Christian Schmidt
7e62048742 Added urlrepo for local file redirection to httpd alias. 2010-06-21 21:03:20 +02:00
Arne Fitzenreiter
0bc58278b9 Fix update acclerator file download at webif.
bug #0000667
2010-06-21 20:45:33 +02:00
Arne Fitzenreiter
5af32f5c8c Add wpad.dat alias that point to proxy.pac. 2010-06-03 21:27:24 +02:00
Christian Schmidt
e9007fefa0 Fixed url filter repository for local redirects.
This fixes bug #0000613
2010-04-11 09:07:13 +02:00