Commit Graph

148 Commits

Author SHA1 Message Date
Peter Müller
3135e76ea1 configroot: Ensure connscheduler/lib.pl is not writable by "nobody"
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-11-18 13:29:10 +00:00
Peter Müller
2689789ec0 configroot: Increase verbosiness of chown operations
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-09-30 17:20:17 +00:00
Peter Müller
bd053b99b3 backup: Set owner of {ex,in}clude{,.user} files to "root"
Since these files are static, there is no legitimate reason why they
should be owned (hence writable) by "nobody". Also, according to
configroot's LFS file, this is the intended behaviour for the *.user
files, which is then overwritten by the backup LFS file. Therefore, set
the file mode of these statically - configroot does not feature other
files in /var/ipfire/backup/ anyway.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
2022-09-27 10:53:29 +00:00
Peter Müller
763efaf672 configroot: Create "settings" and "modify" files for ipblocklist
The third version of this patch conducts the necessary changes in
configroot. Previously, they took place in ipblocklist itself, which
would have caused user settings to be overwritten, should ipblocklist be
shipped in future Core Updates.

Fixes: #12917
Cc: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Acked-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-09-02 06:37:56 +00:00
Peter Müller
5972587884 configroot: Add missing "cp" directive for ipblocklist-functions.pl
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-07-11 10:12:39 +00:00
Tim FitzGeorge
52bb9af897 configroot: Create ipblocklist related dir and settings file.
Signed-off-by: Tim FitzGeorge <ipfr@tfitzgeorge.me.uk>
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-07-07 17:26:14 +02:00
Peter Müller
9a7e4d8506 Switch checksums from MD5 to BLAKE2
Historically, the MD5 checksums in our LFS files serve as a protection
against broken downloads, or accidentally corrupted source files.

While the sources are nowadays downloaded via HTTPS, it make sense to
beef up integrity protection for them, since transparently intercepting
TLS is believed to be feasible for more powerful actors, and the state
of the public PKI ecosystem is clearly not helping.

Therefore, this patch switches from MD5 to BLAKE2, updating all LFS
files as well as make.sh to deal with this checksum algorithm. BLAKE2 is
notably faster (and more secure) than SHA2, so the performance penalty
introduced by this patch is negligible, if noticeable at all.

In preparation of this patch, the toolchain files currently used have
been supplied with BLAKE2 checksums as well on
https://source.ipfire.org/.

Cc: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Acked-by: Michael Tremer <michael.tremeripfire.org>
2022-04-02 14:19:25 +00:00
Peter Müller
8269c8319c firewall: Make logging of conntrack INVALIDs configureable
In theory, logging of dropped packets classified by conntrack as being
INVALID should never be disabled, since one wants to have a paper trail
of what his/her firewall is doing.

However, conntrack seems to drop a lot of (at the first glance
legitimate) packets, hence bloating the logs, making spotting the
important firewall hits more difficult.

This patch therefore adds the option to disable logging of packets being
dropped by conntrack due to INVALID state.

Please note:
- This patch does not add this category to the firewall hits graph.
- The variables in this patch ("LOGDROPCTINVALID") should make it clear
  that it is about toggling _logging_, not the actual _dropping_. Other
  variables are still in need of being renamed to clarify this, which
  will be done in a dedicated patch.
- Also, the changes made to update.sh need to take place in
  config/rootfiles/core/164/update.sh for "master", since this patch has
  been developed against "next". Kindly cherry-pick the necessary
  changes.

Partially fixes: #12778

Reported-by: Arne Fitzenreiter <arne.fitzenreiter@ipfire.org>
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-02-18 22:40:55 +00:00
Stefan Schantl
31c64b9d0d configroot: Drop config file for p2protocols.
The support for creating P2P based rules has been removed from the
firewall. So this file is not longer needed.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
Acked-by: Michael Tremer <michael.tremer@ipfire.org>
2022-02-15 18:13:12 +00:00
Peter Müller
55f6e62cf7 configroot: Drop traffic from and to hostile networks by default
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-01-14 14:17:14 +00:00
Peter Müller
02001624d2 configroot: Enable logging of spoofed packets/martians by default
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-01-14 14:17:08 +00:00
Stefan Schantl
77b373d620 IDS: Add convert-ids-multiple-provider script.
This converter does all the magic to convert any suricata
based IPFire version to work with the new multiple providers
IDS.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2021-12-19 13:23:44 +01:00
Arne Fitzenreiter
4f6ef73542 cfgroot: install manualpages file
this fix the 500 internal server error becuase this file
was not installed by the patch that add the wiki links.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-11-25 23:57:28 +01:00
Peter Müller
3e60ed14e2 Clean up whatever remained from ALGs in userspace
This patch removes translations, directives in LFS files, and ALG shared
object files which all became orphaned after we disabled ALGs due to NAT
Slipstreaming vulnerability in Core Update 155.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-06-03 09:16:30 +00:00
Peter Müller
55f0bafb7b configroot: prevent any Perl file within /var/ipfire/ from being owned by nobody
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-06-02 09:42:50 +00:00
Peter Müller
06f03f5bbb Drop libupnp
This library has received no attention within the last three years. By
design, UPnP is a security risk on any firewall, and and outdated
version of a UPnP library definitely is.

This patch therefore drops libupnp completely.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-05-20 09:39:46 +00:00
Michael Tremer
74d3d9cbe3 firewall: Disable all connection tracking helpers by default
This will mitigate exploiting networks secured by IPFire using NAT
Slipstreaming:

https://lists.ipfire.org/pipermail/development/2021-February/009303.html

Suggested-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-03-02 10:04:46 +00:00
Michael Tremer
36f253d291 configroot: Make extrahd.pl executable
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-01-06 14:50:29 +00:00
Stefan Schantl
31098f84ab configroot: Change ownership of "/var/ipfire/red" to nobody.
Otherwise the WUI is not allowed to put and release the nobeep file in
this folder and the desired functionality does not work.

Fixes #12385.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-12-01 16:14:48 +00:00
Stefan Schantl
af7f9fc43d :xMerge branch 'next' of ssh://git.ipfire.org/pub/git/ipfire-2.x into next-switch-to-libloc
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2020-07-03 18:48:30 +02:00
Michael Tremer
4e58ab4bbf aws-functions.pl: Drop file and move functions to general-functions.pl
There is not enough stuff that it is justified to have an own file.

This patch therefore merges everything into general-functions.pl.

There are no functional changes.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-06-19 17:14:58 +00:00
Stefan Schantl
987d09658e configroot: Create and install location related files.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2020-06-12 19:54:13 +02:00
Michael Tremer
040160c7ce make.sh: Configure Pakfire to load packages from the correct tree
This will configure Pakfire that people who install a nightly
build will also get the packages for this build, etc.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-02-15 11:10:21 +00:00
Stefan Schantl
c919b15c34 DNS: Defaults to use the ISP nameservers.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-01-16 18:21:14 +00:00
Stefan Schantl
b48379d5ba configroot: Create /var/ipfire/dns/servers file
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-01-16 18:20:58 +00:00
Tim FitzGeorge
a5ba473c15 suricata: correct rule actions in IPS mode
In IPS mode rule actions need to be have the action 'drop' for the
protection to work, however this is not appropriate for all rules.
Modify the generator for oinkmaster-modify-sids.conf to leave
rules with the action 'alert' here this is appropriate.  Also add
a script to be run on update to correct existing downloaded rules.

Fixes #12086

Signed-off-by: Tim FitzGeorge <ipfr@tfitzgeorge.me.uk>
Tested-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-06-05 12:39:57 +01:00
Arne Fitzenreiter
6d37280f3e configroot: create main/security settings file
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-05-21 15:03:21 +02:00
Michael Tremer
01604708c3 Merge remote-tracking branch 'stevee/next-suricata' into next 2019-03-14 13:19:35 +00:00
Michael Tremer
38f6bdb740 ipsec: Drop delayed restart setting
This is a very bad race-condition situation and is not solved by
an unintuitive setting.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-02-04 18:20:36 +00:00
Stefan Schantl
85a62b0523 IDS: Install snort to suricata converter
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-01-29 08:26:15 +01:00
Stefan Schantl
c1a3401235 Merge branch 'next' of ssh://git.ipfire.org/pub/git/ipfire-2.x into next-suricata 2019-01-21 13:04:13 +01:00
Michael Tremer
d68e150e86 proxy: Drop web browser check
This is neither reliable nor up to date and is therefore removed

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-01-08 15:54:56 +01:00
Erik Kapfer
e6f7f8e7ba database_attribute: Deliver/create index.txt.attr
Fixes #11904

Since OpenSSL-1.1.0x the database attribute file for IPSec and OpenVPN wasn´t created while initial PKI generation.
OpenVPN delivered an error message but IPSec did crashed within the first attempt.
This problem persists also after X509 deletion and new generation.

index.txt.attr will now be delivered by the system but also deleted and recreated while setting up a new x509.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-01-03 14:52:53 +00:00
Stefan Schantl
a13ddf04d9 Merge branch 'next' of ssh://git.ipfire.org/pub/git/ipfire-2.x into next-suricata
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2018-12-12 09:27:59 +01:00
Michael Tremer
77729e5be8 nfs: Install configuration in package
This was lost in the last update

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-11-28 19:02:53 +00: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
Peter Müller
eee037b890 update disclaimer in LFS files
Most of these files still used old dates and/or domain names for contact
mail addresses. This is now replaced by an up-to-date copyright line.

Just some housekeeping... :-)

Signed-off-by: Peter Müller <peter.mueller@link38.eu>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-09-10 19:20:36 +01:00
Stefan Schantl
72b2109c72 configroot: Move from snort to suricata
Create /var/ipfire/suricata and /var/ipfire/suricata/settings instead of
/var/ipfire/snort and /var/ipfire/snort/settings.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2018-08-02 15:47:31 +02:00
Stefan Schantl
8dcebe5342 IDS: Introduce ids-functions.pl.
This library will contain a set of functions used by the IDS CGI script
and the planned update script for auto-updating the snort ruleset.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2018-07-26 11:54:25 +02:00
Michael Tremer
dc845b6c81 AWS: Hide certain things on the web UI
Those are practically unusable on AWS.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-07-01 12:15:00 +01:00
Michael Tremer
0009de91e8 Ship default settings for language, theme, etc. in all images
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-06-27 09:59:47 +01:00
Michael Tremer
f4a91e23d9 Drop noip updater
This package is unused since we introduced ddns. Dropped.

Fixes: #11708
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-04-24 11:04:34 +01:00
Alexander Marx
5ca163cd82 Captive-Portal: add captive dirs and files to configroot
Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
2017-09-22 18:54:03 +01:00
Michael Tremer
5edc06b701 Remove IPAC stuff
This is unused for a very very very long time and serves
no purpose any more.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2016-10-02 15:13:55 +01:00
Michael Tremer
32d91ecad8 conntrack: Remove old disable_nf_sip indicator file
This is not used any more and not needed either.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2016-04-20 16:23:22 +01:00
Michael Tremer
8a1a3bf393 Merge remote-tracking branch 'ms/iptables-conntrack' into next 2016-01-22 00:54:14 +00:00
Michael Tremer
2b163f4497 Drop tripwire
This add-on is likely to be unused

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2015-12-04 22:18:27 +00:00
Michael Tremer
53a6b00c4f firewall: Disable the PPTP and AMANDA conntrack helpers by default
These do not seem to work at the moment.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2015-08-12 12:46:07 +01:00
Michael Tremer
c8f8bf328f firewall: Add H.323 to the conntrack helpers 2015-05-12 13:33:27 +02:00
Michael Tremer
50354ffe3a firewall: Add IRC to the conntrack helpers 2015-05-12 13:27:24 +02:00