Commit Graph

18279 Commits

Author SHA1 Message Date
Michael Tremer
12cd388967 firewall: Make blocking all traffic impossible on HOSTILE
The current setup can fail and block all traffic on RED if the RETURN
rules could not be created.

This can happen when the kernel fails to load the ipset module, as it is
the case after upgrading to a new kernel. Restarting the firewall will
cause that the system is being cut off the internet.

This design now changes that if those rules cannot be created, the
DROP_HOSTILE feature is just inactive, but it would not disrupt any
traffic.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Daniel Weismüller <daniel.weismueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-14 15:25:58 +00:00
Michael Tremer
fe6b15f843 core165: Actually ship the core files
This filelist is there to ship files that contain the version number of
a release and *must* be shipped every time. For that, they will need to
be a part of the filelist.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-10 10:35:44 +00:00
Michael Tremer
817f4c1410 Merge branch 'next' 2022-03-10 10:27:51 +00:00
Michael Tremer
eb41bf304e samba: Fix rootfile on x86_64
The web UI menu entry, samba.cgi and the control binary were lost in
61d7aaa3ef.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-10 10:25:19 +00:00
Stefan Schantl
47b2640d37 general-functions.pl: Do not die if no red interface could be determined.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-09 15:46:19 +00:00
Stefan Schantl
74659290e9 rules.pl: Do not create HOSTILE rules if no red dev is available.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-09 15:45:59 +00:00
Stefan Schantl
870c223e0f rules.pl: Adjust code to use sets generated by libloc 0.9.11
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-09 15:43:17 +00:00
Stefan Schantl
cd3e5923fe libloc: Update to 0.9.11
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-09 15:41:49 +00:00
Arne Fitzenreiter
ead01caeb8 rtl8189fs: add realtek wlan driver
this chip is the successor of the rtl8189es look some boards has
silently switched to the new chip.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-09 15:25:57 +00:00
Arne Fitzenreiter
5643fd8a90 rtl8189fs: add realtek wlan driver
this chip is the successor of the rtl8189es look some boards has
silently switched to the new chip.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-09 15:22:38 +00:00
Stefan Schantl
e895c2de72 optionsfw.cgi: Add default settings for newly added options.
If no settings for those features can be obtained from the settings
file, set them to the following defaults.

* DROPSPOOFEDMARTIAN -> on (yes)
* DROPHOSTILE -> off (no - because only fresh installed systems should
                     do this)
* LOGDROPCTINVALID -> on (yes)

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-08 11:30:18 +00:00
Michael Tremer
7f8bb55a60 core165: Ship hyperscan
This package is being built with a different configuration.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-08 10:42:00 +00:00
Michael Tremer
de686e49e2 linux: Fix for CVE-2022-0847 aka Dirty Pipe
https://dirtypipe.cm4all.com

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-08 10:04:15 +00:00
Michael Tremer
32ce7ab402 linux: Fix for CVE-2022-0847 aka Dirty Pipe
https://dirtypipe.cm4all.com

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-08 09:59:43 +00:00
Michael Tremer
b69659af02 core164: Ship backup exclude file
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-07 18:53:09 +00:00
Michael Tremer
c7e0d73e7c backup: Make include/exclude files relative
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-07 18:51:23 +00:00
Michael Tremer
3f8e70f6b3 backup: Don't restore excluded files
Sometimes, we restore a backup that has been created earlier before
exclude files have been changed. To avoid overwriting those files, we
will consider the exlude list upon restore.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-07 18:51:20 +00:00
Michael Tremer
ca1fdb6954 backup: Exclude oinkmaster.conf
This file is a system configuration file and does not contain any
configruation from the user.

Since it can be overwritten in a backup and restored to an older state,
this can cause problems such as #12788.

Fixes: #12788
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-07 18:51:17 +00:00
Michael Tremer
fc717041c4 backup: Abort when the backup could not be extracted
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-07 18:51:14 +00:00
Stefan Schantl
18f0991c35 ids.cgi: Only read-in ignored hosts, if the ignore file exists.
Otherwise the CGI will crash.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-07 18:50:45 +00:00
Stefan Schantl
dcacf03e80 ids-functions.pl: Do not create an empty ignored settings file.
The file will be created by the WUI, when adding the first host.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-07 18:50:34 +00:00
Stefan Schantl
85b1d83b2a update-ids-ruleset: Always drop the lock file if it has been created during runtime.
In some situations or if an error happened, the lock file could be
keep on the system. In such a case the IDS page would be locked forever
until user interaction or reboot of the system.

Now the script checks if it has created such a lock and release it when
the script exists.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Acked-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-07 18:49:59 +00:00
Stefan Schantl
da3611b276 ids-functions.pl: Do not try to chown files while extracting them.
We are almost running as an unprivileged user and therfore have not
the permissions to do this.

This will save us a lot of confusion error messages.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-07 18:49:37 +00:00
Peter Müller
6fe4eb6094 Core Update 165: Rename squid-accounting add-on to proxy-accounting
https://lists.ipfire.org/pipermail/development/2022-February/012482.html

The second version of this patch omits bogus directives for restarting a
service, which proxy-accounting is not.

Cc: Michael Tremer <michael.tremer@ipfire.org>
Cc: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-07 18:47:23 +00:00
Michael Tremer
ea04468d07 core165: Ship ids.cgi
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-07 18:46:34 +00:00
Stefan Schantl
fad7d1c4c6 ids.cgi: Only read-in ignored hosts, if the ignore file exists.
Otherwise the CGI will crash.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-07 18:46:15 +00:00
Michael Tremer
7b82d83d7e core165: Ship optionsfw.cgi
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-07 18:45:58 +00:00
Stefan Schantl
8f51b0a4f5 optionsfw.cgi: Add default settings for newly added options.
If no settings for those features can be obtained from the settings
file, set them to the following defaults.

* DROPSPOOFEDMARTIAN -> on (yes)
* DROPHOSTILE -> off (no - because only fresh installed systems should
                     do this)
* LOGDROPCTINVALID -> on (yes)

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-07 18:45:28 +00:00
Stefan Schantl
9106bfca42 ids-functions.pl: Merge same named rulefiles during extract.
In case a rulestarball contains several same-named rulefiles
they have been overwritten each time and so only contained the content
from the last extracted one.

Now the content of those files will be merged by appending the content
to the first extracted one for each time.

Fixes #12792.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-07 17:04:15 +00:00
Stefan Schantl
cad8657532 ids-functions.pl: Do not create an empty ignored settings file.
The file will be created by the WUI, when adding the first host.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-03-05 19:28:24 +00:00
Stefan Schantl
2b12a010d7 ids-functions.pl: Merge same named rulefiles during extract.
In case a rulestarball contains several same-named rulefiles
they have been overwritten each time and so only contained the content
from the last extracted one.

Now the content of those files will be merged by appending the content
to the first extracted one for each time.

Fixes #12792.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-03-05 19:28:08 +00:00
Peter Müller
ade2424f6b Revert "Core Update 165: Ship update-ids-ruleset"
update-ids-rulesets is relevant for Core Update 164, not Core Update 165.

This reverts commit 9713023546.
2022-03-05 14:35:09 +00:00
Peter Müller
4003479449 Core Update 164: Ship update-ids-rulesets
@Michael: Please cherry-pick this one into "master" as well.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-03-05 14:34:39 +00:00
Stefan Schantl
96e2e870aa firewall-lib.pl: Remove prefix when dealing with ipset sets.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-03-05 14:32:58 +00:00
Stefan Schantl
5841800969 rules.pl: Autodetect ipset db file to restore.
This commit allows the ipset_restore() function to auto-detect
which set file needs to be restored.

Currently it is limitated to country codes only, because we currently
does not support anything else.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-03-05 14:32:44 +00:00
Stefan Schantl
7b529f5417 firewall: Move dropping hostile networks to rules.pl.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-05 14:31:55 +00:00
Stefan Schantl
2801213dcc rules.pl: Allow dynamic destory of loaded but unused ipset sets.
Instead of stupidly destroying all ipsets, we now grab the already loaded sets
and compare them with the loaded sets during runtime of the script.

So we are now able to determine which sets are not longer required and
safely can destroy (unload) at a later time.

This saves us from taking care about dropping/flushing rules which are
based on ipset before we can destroy them - because only unused sets are
affected.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Inspired-by: Tim FitzGeorge <ipfr@tfitzgeorge.me.uk>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-05 14:31:51 +00:00
Peter Müller
65808f8478 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

Please note that the certdata.txt file only appears to drop MD5
checksums in favour of SHA256, so there is no need in shipping
ca-certificates with the next Core Update.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-03-05 14:31:02 +00:00
Peter Müller
975a000753 Tor: Update to 0.4.6.10
Full changelog as per https://gitweb.torproject.org/tor.git/plain/ChangeLog?h=tor-0.4.6.10 :

Changes in version 0.4.6.10 - 2022-02-04
  This version contains minor bugfixes but one in particular is that relays
  don't advertise onion service v2 support at the protocol version level.

  o Minor features (fallbackdir):
    - Regenerate fallback directories generated on February 04, 2022.

  o Minor features (geoip data):
    - Update the geoip files to match the IPFire Location Database, as
      retrieved on 2022/02/04.

  o Minor bugfix (logging):
    - Update a log notice dead URL to a working one. Fixes bug 40544;
      bugfix on 0.3.5.1-alpha.

  o Minor bugfix (relay):
    - Remove the HSDir and HSIntro onion service v2 protocol versions so
      relay stop advertising that they support them. Fixes bug 40509;
      bugfix on 0.3.5.17.

  o Minor bugfixes (MetricsPort, Prometheus):
    - Add double quotes to the label values of the onion service
      metrics. Fixes bug 40552; bugfix on 0.4.5.1-alpha.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-03-05 14:30:52 +00:00
Peter Müller
9713023546 Core Update 165: Ship update-ids-ruleset
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-03-05 14:30:10 +00:00
Stefan Schantl
a956712e75 update-ids-ruleset: Always drop the lock file if it has been created during runtime.
In some situations or if an error happened, the lock file could be
keep on the system. In such a case the IDS page would be locked forever
until user interaction or reboot of the system.

Now the script checks if it has created such a lock and release it when
the script exists.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Acked-by: Peter Müller <peter.mueller@ipfire.org>
2022-03-05 14:30:06 +00:00
Stefan Schantl
8353e28ad2 ids-functions.pl: Do not try to chown files while extracting them.
We are almost running as an unprivileged user and therfore have not
the permissions to do this.

This will save us a lot of confusion error messages.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-03-05 14:28:36 +00:00
Michael Tremer
419153571b backup: Make include/exclude files relative
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-04 10:41:30 +00:00
Michael Tremer
e5ad6e2ab1 backup: Don't restore excluded files
Sometimes, we restore a backup that has been created earlier before
exclude files have been changed. To avoid overwriting those files, we
will consider the exlude list upon restore.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-04 10:37:00 +00:00
Michael Tremer
026935a137 backup: Exclude oinkmaster.conf
This file is a system configuration file and does not contain any
configruation from the user.

Since it can be overwritten in a backup and restored to an older state,
this can cause problems such as #12788.

Fixes: #12788
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-04 10:27:01 +00:00
Michael Tremer
270d572504 backup: Abort when the backup could not be extracted
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-04 10:19:14 +00:00
Michael Tremer
a735dad621 python3-cffi: Fix armv6l rootfile
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-03-02 13:37:28 +00:00
Peter Müller
d739da6f47 python3-cffi: Add 32 bit ARM rootfile again due to "gnueabi" != "gnu"
My fault, again. :-/

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-03-01 15:25:01 +00:00
Peter Müller
70e23c18a4 python3-yaml: Drop unnecessary armv6l rootfile
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-02-28 20:18:58 +00:00
Peter Müller
67a38b30b0 Merge branch 'master' into next 2022-02-28 20:16:38 +00:00