Commit Graph

6150 Commits

Author SHA1 Message Date
Stefan Schantl
b59cdbeea5 ids-functions.pl: Add private function to cleanup the rules directory.
This private function is used to remove any files which are stored in the
IDS rules directory and prevent from any old (unneeded or conflicting) files
after an update or complete change of the ruleset source.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2018-10-12 15:12:10 +02:00
Stefan Schantl
5d3b16c6df suricata: Rootfile update
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2018-10-12 13:08:35 +02:00
Stefan Schantl
8d087d0391 Merge branch 'next' of ssh://git.ipfire.org/pub/git/ipfire-2.x into next-suricata 2018-10-02 07:35:13 +02:00
Arne Fitzenreiter
e3ab1962ed Merge branch 'core124' of git.ipfire.org:/pub/git/ipfire-2.x into core124 2018-09-28 18:43:15 +02:00
Arne Fitzenreiter
d435f08d9b core124: add apache initskript and nsswitch.conf to updater
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2018-09-28 18:12:12 +02:00
Arne Fitzenreiter
71954dcac4 core124: don't remove network trigger script
this script is still needed if /var/ipfire is on an extra partition.
New installations works without this script.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2018-09-28 17:49:10 +02:00
Arne Fitzenreiter
ae61c74db9 core124: fix removing old initrd files on arm systems
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2018-09-27 21:53:53 +02:00
Stefan Schantl
2d475a3c6c Merge branch 'next' of ssh://git.ipfire.org/pub/git/ipfire-2.x into next-suricata 2018-09-26 14:49:34 +02:00
Stefan Schantl
3aadbbca38 stage2: Rootfile update for update-ids-ruleset script
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2018-09-26 14:38:46 +02:00
Arne Fitzenreiter
161a5b834a Merge remote-tracking branch 'origin/master' into core124 2018-09-26 14:09:57 +02:00
Stefan Schantl
ed06bc811f ids-functions.pl: Add backend code to handle the "cron" function of suricatactrl
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2018-09-26 14:09:53 +02:00
Michael Tremer
0a5823db02 ssh: Revert MaxAuthTries setting
This is entirely not practicable and should have been changed
before. I missed this when I tested the configuration.

It is common that multiple SSH keys exist and three is common
number (RSA, ECDSA & Ed25519). A key passed with ssh -i and
password authentication are not even tried.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-09-25 20:24:39 +01:00
Arne Fitzenreiter
46b3073242 core124: fix updater
fix some missing files on arm
remove not needed rebuild initrd because we ship it already built

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2018-09-23 02:44:03 +02:00
Arne Fitzenreiter
0f2186725e core124: finish updater
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2018-09-21 15:26:52 +02:00
Arne Fitzenreiter
e2a3147fe5 arm: boot.scr: add setting to edit fdt via uEnv.txt
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2018-09-21 15:24:50 +02:00
Arne Fitzenreiter
bdf9df742c kernel: update to 4.14.71
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2018-09-20 19:51:43 +02:00
Michael Tremer
5210b5879b core124: Ship updated iproute2
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-09-20 14:54:02 +01:00
Matthias Fischer
b1bfe61711 iproute2: Update to 4.18.0
Triggered by https://bugzilla.ipfire.org/show_bug.cgi?id=11866 ;-)

For details see:
https://lwn.net/Articles/762515/

Best,
Matthias

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-09-20 14:53:35 +01:00
Michael Tremer
37d7f38018 core124: Ship updated openssh package
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-09-20 14:52:17 +01:00
Michael Tremer
1d2fe90cc8 core124: Ship updated OpenSSH configuration
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-09-20 14:51:13 +01:00
Michael Tremer
bd0686f441 ssh: Remove AuthenticationMethods directive
This is only setting something that is default anyways and
prevents sshd from starting if one of the listed methods
is not activated.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-09-20 14:50:25 +01:00
Peter Müller
38485efafb add hardened SSH server configuration
In order to harden OpenSSH server in IPFire, using the upstream default configuration
and edit it via sed commands in LFS file is error-prone and does not scale.

Thereof we ship a custom and more secure OpenSSH server configuration which
is copied into the image during build time.

The fourth version of this patch disables password authentication by
default, since this is required by some cloud hosters in order to apply
the image. Further, this method is less secure than pubkey
authentication.

Non-AEAD ciphers have been re-added to provide compatibility to older
RHEL systems.

Fixes #11750
Fixes #11751
Partially fixes #11538

Signed-off-by: Peter Müller <peter.mueller@link38.eu>
Cc: Marcel Lorenz <marcel.lorenz@ipfire.org>
Cc: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-09-20 14:27:01 +01:00
Michael Tremer
a6c190818a backup: Fix deleting backup files
Signed-off-by: Arne Fitzenreiter <arne.fitzenreiter@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-09-20 14:21:41 +01:00
Arne Fitzenreiter
06131f41e4 kernel: arm32-bit: update rootfiles
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2018-09-17 07:44:55 +02:00
Arne Fitzenreiter
a834285d1b kernel: arm: enable chacha poly
fixes: #11855
todo: add rootfiles for arm 32-bit

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2018-09-15 15:58:13 +02:00
Arne Fitzenreiter
276692f378 core124: add kernel files to updater
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2018-09-15 15:49:10 +02:00
Michael Tremer
088b7f4f3f core124: Ship updated unbound
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-09-13 15:03:59 +01:00
Matthias Fischer
76e26c7f69 unbound: Update to 1.8.0
For details see:

  https://nlnetlabs.nl/svn/unbound/tags/release-1.8.0/doc/Changelog

and

  https://nlnetlabs.nl/projects/unbound/download/

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-09-13 15:03:59 +01:00
Michael Tremer
0023f8a92b core124: Ship updated backup.cgi
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-09-13 15:03:59 +01:00
Michael Tremer
b8fdc7398c static-routes: Make it clear that we are reloading routes
When RED is brought down, we will reload all static routes.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-09-13 15:03:59 +01:00
Arne Fitzenreiter
924b48c789 kernel: update to 4.14.69
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2018-09-12 21:04:07 +02:00
Michael Tremer
063de1600b core124: Ship CA certificates
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-09-10 18:23:27 +01:00
Peter Müller
05a89532d7 update ca-certificates CA bundle
Update the CA certificates list to what Mozilla NSS ships currently.

The original file can be retrieved from:
https://hg.mozilla.org/mozilla-central/raw-file/tip/security/nss/lib/ckfw/builtins/certdata.txt

Signed-off-by: Peter Müller <peter.mueller@link38.eu>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-09-10 18:22:55 +01:00
Peter Müller
edea6ec5a4 add hardened SSH client configuration
Introduce a custom OpenSSH client configuration file for IPFire.
Some people use it as a jumping host, so applying hardening options
system-wide improves security.

Cryptography setup is the same as for OpenSSH server configuration.

The second version of this patch re-adds some non-AEAD cipher suites
which are needed for connecting to older RHEL systems.

Partially fixes #11751

Signed-off-by: Peter Müller <peter.mueller@link38.eu>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-09-10 16:36:39 +01:00
Michael Tremer
0762dcc4e8 core124: Ship updated unbound configuration and restart daemon
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-09-10 16:35:25 +01:00
Peter Müller
8a0585837c Unbound: Use aggressive NSEC
This avoids some needless lookups to destination domains
with a very high NXDOMAIN rate and reduces load on upstream
servers.

See https://nlnetlabs.nl/documentation/unbound/unbound.conf/
for further details.

Signed-off-by: Peter Müller <peter.mueller@link38.eu>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-09-10 16:34:30 +01:00
Peter Müller
4e4128faac Unbound: Use caps for IDs
Attempt to detect DNS spoofing attacks by inserting 0x20-encoded
random bits into upstream queries. Upstream documentation claims
it to be an experimental implementation, it did not cause any trouble
on productive systems here.

See https://nlnetlabs.nl/documentation/unbound/unbound.conf/ for
further details.

Signed-off-by: Peter Müller <peter.mueller@link38.eu>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-09-10 16:34:20 +01:00
Peter Müller
ffba3c98ba Unbound: Enable DNS cache poisoning mitigation
By default, Unbound neither keeps track of the number of unwanted
replies nor initiates countermeasures if they become too large (DNS
cache poisoning).

This sets the maximum number of tolerated unwanted replies to
1M, causing the cache to be flushed afterwards. (Upstream documentation
recommends 10M as a threshold, but this turned out to be ineffective
against attacks in the wild.)

See https://nlnetlabs.nl/documentation/unbound/unbound.conf/ for
details. This version of the patch uses 1M as threshold instead of
5M and supersedes the first and second version.

Signed-off-by: Peter Müller <peter.mueller@link38.eu>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-09-10 16:34:18 +01:00
Michael Tremer
4ca0cb3354 core124: Ship updated redirect page template
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-09-10 16:30:52 +01:00
Michael Tremer
a0d612be7a core124: Rebuild initrd
This script was missing in the last update and therefore
no microcodes were included.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-09-09 18:27:56 +01:00
Michael Tremer
505b886d0d core124: Apply changed sysctl.conf
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-09-09 17:48:14 +01:00
Peter Müller
d5fe332283 do not expose kernel address spaces even to privileged users
Change this setting from 1 to 2 so kernel addresses are not
displayed even if a user has CAPS_SYSLOG privileges.

See also:
- https://lwn.net/Articles/420403/
- https://tails.boum.org/contribute/design/kernel_hardening/

Signed-off-by: Peter Müller <peter.mueller@link38.eu>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-09-09 17:47:08 +01:00
Michael Tremer
65ae069c21 core124: Ship updated rng-tools
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-09-09 17:43:53 +01:00
Stefan Schantl
fd72c85eb8 Enable threshold file in suricata.yaml
Enable and specify the path to the threshold-file in the suricata.yaml,
otherwise the programm is trying to read it from a build-in default
location and prints the following error message:

Error opening file: "/etc/suricata//threshold.config": No such file or directory

Fixes #11837.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2018-08-30 15:12:29 +02:00
Stefan Schantl
762a33f17c suricata: Add files to be backuped
Now all oinkmaster related config files and suricata
related yaml files in "/var/ipfire/suricata/" will be
included into the backups.

Also the entire ruleset is part of the backup, so after a
backup has been restored, the IDS can be used in the same way
as before.

Fixes #11835.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2018-08-30 14:13:37 +02:00
Stefan Schantl
21cab141ec suricata: Rule files are now located in /var/lib/suricata
Place the rulefiles from now in "/var/lib/suricata".

Fixes #11834

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2018-08-29 12:37:44 +02:00
Stefan Schantl
d2e6bf6e5f suricata: Do not ship an example configuration file
Stop shipping a full example configuration file for suricata.

Fixes #11836.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2018-08-29 12:27:12 +02:00
Arne Fitzenreiter
fd313a1ae6 Merge branch 'master' into next 2018-08-29 07:44:59 +02:00
Stefan Schantl
be52c68a2d ids-functions.pl: Early abort downloadruleset() if no ruleset is configured
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2018-08-27 15:11:28 +02:00
Michael Tremer
aa61d769b7 core124: Ship latest pakfire changes
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-08-27 07:34:28 +01:00