Commit Graph

18363 Commits

Author SHA1 Message Date
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
Arne Fitzenreiter
6e2c8f4818 suricata: drop unsupported JA3 rule provider
our current suricata version not support JA3 based rules so
this drop the providers from the list.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2022-02-26 14:19:45 +00:00
Peter Müller
f6ec32737f borgbackup: Fix rootfile on 32 bit ARM
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-02-26 12:16:39 +00:00
Peter Müller
d03ee3218f Python3: Fix rootfile for 32 bit ARM again
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-02-25 14:04:06 +00:00
Peter Müller
82674728e3 Core Update 165: Ship vpnmain.cgi
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-02-23 15:54:13 +00:00
Michael Tremer
59dc2a4c47 vpnmain.cgi: Select Curve 25519 as default
This was supposed to be enabled by default. Due to a copy-and-paste
error, it was, however, not selected for IKE, but only for ESP.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
2022-02-23 15:53:46 +00:00
Michael Tremer
dcd8a86b03 oci-python-sdk: Depend on python3-certifi
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-02-23 15:52:16 +00:00
Peter Müller
2598706f23 Core Update 165: Ship dhcpcd-related changes
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-02-23 15:51:33 +00:00
Michael Tremer
7cdd550577 dhcpcd: Allow freely setting MTU
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
2022-02-23 15:46:45 +00:00
Michael Tremer
9c68992498 dhcpcd: Remove old MTU setting script
This is being replaced by adding the MTU option to any routes that
dhcpcd installs.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
2022-02-23 15:46:45 +00:00
Michael Tremer
5d0d1144fb dhcpcd: Force setting MTU through dhcpcd
The DHCP server can instruct clients to configure a certain MTU.

This used to be done by setting the MTU of the interface. However,
dhcpcd has changed this behaviour using routes to.

We used to have a modified version of the old mechanism which no longer
works well with the new system and is therefore to be dropped.

This is the first commit in the series implementing the new behaviour
and telling dhcpcd to use the configured MTU.

Fixes: #12563
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
2022-02-23 15:46:44 +00:00
Peter Müller
8fa66ce750 Revert "gcc: Compile without ZSTD"
https://lists.ipfire.org/pipermail/development/2022-February/012544.html

This reverts commit 0b6ba4a0ca.
2022-02-23 15:36:25 +00:00
Peter Müller
5de5bec3f4 Python3: Attempt to fix rootfile on 32 bit ARM
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-02-22 20:18:27 +00:00
Peter Müller
61d2d36f6c python3-cffi: Fix rootfile more elegant on ARM
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-02-22 20:13:44 +00:00
Peter Müller
286098fdfd Revert "python3-cffi: Fix rootfiles on ARM"
This reverts commit 410758e03f.
2022-02-22 20:13:19 +00:00
Stéphane Pautrel
2da432a772 fr: Update French translation
- 24 strings have been added (drop hostile and spoofed martians, fw red,
  ids options and provider, pakfire update messages...)
- 3 strings have been inproved

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-02-22 20:10:56 +00:00
Michael Tremer
1e5ef7e482 credits: Run ./make.sh update-contributors
This should be run regularly, or ideally just before we close a Core
Update so that we can give credit to everywhere who has contributed to
it.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-02-22 20:10:38 +00:00