Commit Graph

17166 Commits

Author SHA1 Message Date
Michael Tremer
2469ca9fba suricata: Store bypass flag in connmark and restore
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Tested-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-19 11:34:54 +00:00
Michael Tremer
49dd3e2946 suricata: Add rule to skip IPS if a packet has the bypass bit set
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Tested-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-19 11:34:43 +00:00
Michael Tremer
855475580b suricata: Always append rules instead of inserting them
This allows us to add rules in a consistent order like they are in the
script.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Tested-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-19 11:34:32 +00:00
Michael Tremer
9deccd1cba suricata: Enable bypassing unhandled streams
If a stream cannot be identified or if suricata has decided that it
cannot do anything useful any more (e.g. TLS sessions after the
handshake), we will allow suricata to bypass any following packets in
that flow

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Tested-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-19 11:34:19 +00:00
Michael Tremer
11f7218f9c suricata: Define bypass mark
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
Tested-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-19 11:34:10 +00:00
Michael Tremer
4f07c279a0 suricata: Rename MARK/MASK to REPEAT_MARK/REPEAT_MASK
This should avoid confusion when we add more marks

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
Tested-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-19 11:34:00 +00:00
Michael Tremer
761fadbdde suricata: Set most significant bit as repeat marker
I have no idea why some odd value was chosen here, but one bit should be
enough.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
Tested-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-19 11:33:47 +00:00
Arne Fitzenreiter
aaf266ac2b core161: add pakfire.conf and pakfire/lib/functions.pl
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-19 11:32:00 +00:00
Michael Tremer
ec18a1ecae pakfire: Allow pinning Pakfire to one mirror server
This patch adds a new $mirror option to the configuration file which
will cause Pakfire to only use this one to download any files.

This feature is disabled by default but useful for development.

Fixes: #12706
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-19 11:28:39 +00:00
Arne Fitzenreiter
5670285852 core161: add index.cgi and general-functions.pl
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-19 11:27:58 +00:00
Michael Tremer
637eb94684 index.cgi: Remove left-over DNSSEC status warning
An error message is still shown although there is no option to disable
DNSSEC at the moment. The old marker file could still be present on
older machines.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-19 11:24:07 +00:00
Arne Fitzenreiter
0165dd4025 core161: add partresize
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-19 11:23:12 +00:00
Michael Tremer
a09578f4eb OCI: Enable serial console by default
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-19 11:21:57 +00:00
Arne Fitzenreiter
80909fb6da strongswan: update _updown to use conmark for QoS
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-18 18:57:18 +02:00
Arne Fitzenreiter
819fdfb17a QoS: imgress Connmark restore, layer7 and IPSec handling
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-18 14:44:59 +02:00
Arne Fitzenreiter
03c7877845 kernel: update to 5.10.74
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-18 00:35:42 +02:00
Arne Fitzenreiter
3c838a59ea makeqosscripts: add missing parenthesis at QOS_OUT Layer7 rules.
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-16 10:18:42 +02:00
Arne Fitzenreiter
79930b29a4 kernel: update to 5.10.73
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-15 08:07:04 +02:00
Arne Fitzenreiter
b04724fd34 u-boot-friendlyarm: copy binary from core159
this u-boot version cannot build without python2 that is removed
with core161 so this copy the binary from older build.

Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-15 06:00:08 +00:00
Arne Fitzenreiter
c8bb619a71 core161: remove python2 module from collectd
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-13 16:36:59 +00:00
Arne Fitzenreiter
97ac4778bb core161: now use 2to3 of python3
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-13 16:33:43 +00:00
Arne Fitzenreiter
b0302f7fad core161: remove python2 at update
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-13 12:33:09 +00:00
Adolf Belka
d5bb33744a python: removal of python2 from IPFire
- Final patch for removal of python2 from IPFire. This can be implemented in an
   appropriate Core Update after all other python2 related patches have been implemented
   and confirmed working.

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Acked-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-13 12:28:12 +00:00
Matthias Fischer
81acbae3f1 nano: Update to 5.9
For details see:
https://www.nano-editor.org/news.php

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Reviewed-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-13 12:24:36 +00:00
Arne Fitzenreiter
8e3167cc44 guardian: bump PAK_VER
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-13 12:23:40 +00:00
Matthias Fischer
2f6232d56c Bought a 'd' - fixed an old typo
'bandwith...' should be 'bandwidth...'.

Despite being my favourite typo for the past few years(?),
today I decided to try to say 'Goodbye' to an old friend.

Similar to 'MB writen' its hard but I think it just about time.

'qos' and 'guardian' will never be the same for me... ;-)

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Reviewed-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-13 12:22:49 +00:00
Peter Müller
13aeb19217 proxy.cgi: Remove option to show Squid's version entirely
There is no sense to display this to anybody, and we do not reveal
version information anywhere else on purpose. The IT staff knows which
version of IPFire they are running (hopefully the latest), and it's
none of the rest of the world's business.

Fixes: #12665 (in some way)

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>
2021-10-13 12:17:55 +00:00
Arne Fitzenreiter
61cc803fad core161: add squid-asnbl and proxy.cgi
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-13 12:16:45 +00:00
Peter Müller
cb17776812 langs: Add English and German translations for newly added web proxy features
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-13 12:13:47 +00:00
Peter Müller
bb5ca28313 proxy.cgi: Implement proactive Fast Flux detection and detection for selectively announced destinations
This patch adds two new features to IPFire's web proxy:

(a) Proactive Fast Flux detection
    FQDNs are resolved to their IP addresses, which are then resolved to
    corresponding Autonomous System Numbers using IPFire's location
    database. Most destinations will scatter across a very low number of
    ASNs (not to be confused with IP addresses!). FQDNs hosted on Fast
    Flux setups have a significantly higher ASN diversity (5 is usually
    a good threshold), so they can be proactively detected.

(b) Detection for selectively announced destinations
    Especially in targeted operations, miscreants host FQDNs for
    exfiltrating data or malware distributions on ASNs not announced
    globally, but only to the intended victim or it's upstream ISPs.

    That way, security researchers located in other parts of the
    internet have no insights into these attacks, hence not being able
    to publish listings or send take down notices for the domains used.

    While RPKI made this attack harder, it can still be observed every
    now and then.

    This feature also protects against accessing FQDNs resolving to IP
    addresses not being globally routeable, hence providing a trivial
    mitigation for so-called "rebound attacks" - which we cannot filter
    at DNS level currently.

The second version of this patch consumes the user-defined whitelist for
the URL filter (if present and populated) for the ASNBL helper as well,
to make exceptions for funny destinations such as fedoraproject.org
possible. In addition, the ASNBL helper's sanity tests no longer include
publicly routable IP addresses, so failures on location01 cannot brick
IPFire installations in the field.

Thanks to Michael Tremer and Adolf Belka for these suggestions.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-13 12:13:30 +00:00
Peter Müller
2b59141553 squid-asnbl: New package
This package adds an ASNBL helper for detecting Fast Flux setups and
selectively announced networks (i. e. FQDNs resolving to IP addresses
not being announced by an Autonomous System) to the distribution.
Afterwards, the helper script is located at /usr/bin/asnbl-helper.py .

The second version of this patch updates squid-asnbl to upstream version
0.2.2, improving logging in case of detected Fast Flux setups.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-13 12:13:04 +00:00
Arne Fitzenreiter
e314dc82a8 core161: add hexdump
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-13 12:10:04 +00:00
Michael Tremer
45124fbbc2 util-linux: Ship hexdump
This is a handy tool which can help debugging any problems and should be
part of the distribution.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-13 12:09:27 +00:00
Adolf Belka
9f9d0974f0 client175: Removal of this package as it currently only works with python2
- Removal of the lfs, rootfile and initscript
- Removal of client175 entry in the make.sh file

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-13 12:09:09 +00:00
Arne Fitzenreiter
c59dc6a724 core161: add makegraphs and hddshutdown
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-13 12:08:30 +00:00
Adolf Belka
cbf3a350ac makegraphs: Update script for new iostat output format - Bug#12702
- Modification of iostat line as per input in Bug#12702

Fixes: 12702
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-13 12:05:25 +00:00
Adolf Belka
74b9fcc65e hddshutdown: Update script for new iostat output format - Bug#12702
- Modification of iostat line as per input in Bug#12702

Fixes: 12702
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-13 12:05:13 +00:00
Arne Fitzenreiter
a4d0d0a1e4 core161: add apache2
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-13 12:03:56 +00:00
Matthias Fischer
b6ef9f4b3e apache: Update to 2.4.51
For details see (2.49):
https://dlcdn.apache.org//httpd/CHANGES_2.4.49

For 2.51:
https://dlcdn.apache.org//httpd/CHANGES_2.4.51

"SECURITY: CVE-2021-42013: Path Traversal and Remote Code
Execution in Apache HTTP Server 2.4.49 and 2.4.50 (incomplete
fix of CVE-2021-41773) (cve.mitre.org)
It was found that the fix for CVE-2021-41773 in Apache HTTP
Server 2.4.50 was insufficient..."

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Reviewed-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-13 12:00:55 +00:00
Arne Fitzenreiter
9b189f4493 core161: add firewall changes to update
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-13 12:00:11 +00:00
Michael Tremer
51c4b73f7a IPsec: Replace MARK 50 by 0x00800000
This change is necessary because we are using the right-hand two bytes
for storing the QoS classes.

All IPsec traffic will now be skipped and never classified by the QoS.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-13 11:47:27 +00:00
Michael Tremer
f857c5c630 QoS: Make outgoing packet processing use CONNMARK
This will significantly reduce the load when classifying outgoing
traffic as there won't be any overhead as soon as the connection has
been classified. The classficiation is being stored in the iptables MARK
which will be copied to CONNMARK if changed.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-13 11:46:50 +00:00
Michael Tremer
0bb882c4bb QoS: Drop support for hardcoded ACK rules
This feature has to go in order to take advantage of CONNMARK which will
drastically decrease CPU load when passing packets.

We no longer will see every packet in the QOS-INC chain in order to
change classification of that packet. It is also party counter-intuitive
to have parts of one connection in one class and the corresponding ACK
packets in another.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-13 11:46:35 +00:00
Michael Tremer
c825fcef40 firewall: Always restore all connection marks
This was done by tc only when QoS was enabled

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-13 11:46:23 +00:00
Michael Tremer
45329c0a66 QoS: Use the two right hand bytes to mark packets
In order to not deal with any marks from NAT and the IPS, this patch
adds masks to all places where packets are being marked for individual
QoS classes.

Instead of being able to use the "fw" match in tc, we have to use the
u32 to apply the mask.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-13 11:46:06 +00:00
Michael Tremer
ce31144c62 firewall: Only check relevant bits for NAT fix rules
In order to use the highest two bits for surciata bypass, we will need
to make sure that whenever we compare any other marks, we do not care
about anything else.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-13 11:45:48 +00:00
Arne Fitzenreiter
5c372259e3 kernel: update to 5.10.72
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-10 13:23:30 +02:00
Arne Fitzenreiter
8bb805760f kernel: add realtek rtl88x2bu wlan module
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-10 13:22:48 +02:00
Arne Fitzenreiter
58f6264fa4 kernel: update to 5.10.71
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-10-10 06:46:25 +00:00
Arne Fitzenreiter
02fadedf8d initskrips: leds: add nanopi r2s support 2021-10-10 06:45:09 +00:00