Commit Graph

160 Commits

Author SHA1 Message Date
Vincent Li
95b06e6e28 wireguard: install empty config and UI functions
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Wed Sep 11 02:24:49 2024 +0200

    wireguard: Move functions into their own file

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 85ec8363a873100fc1bb49e3c01f9f63bf97c6e1
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Wed Aug 14 15:55:06 2024 +0000

    wireguard: Install empty configuration files

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-06-26 08:53:27 -07:00
Vincent Li
b9262e849b haproxy: move haproxy to core
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-04-29 09:45:28 -07:00
Vincent Li
5df5d88abd loxilb: add loxilb init script
add loxilb init script and initial loxilb FW settings

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-04-27 10:48:42 -07:00
Vincent Li
04f60a6291 firewall: replace echo initial optionsfw settings
use echo initial optionsfw settings seems creating
duplicated optionsfw settings.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-04-17 09:13:50 -07:00
Vincent Li
6eef7f8535 firewall: add firewall bridge mode
add firewall bridge mode so it can be used as
layer 2 inline bridge for either DDoS protection
or firewall filter by iptable rules configured in
netfilter filter table forward chain.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-04-17 09:13:50 -07:00
Vincent Li
245634dacd initscripts: add TCP DDoS XDP program init script
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-04-01 13:38:09 -07:00
Vincent Li
88c90aadcd ddos: add ddos init script
add ddos init to load/attach XDP DDoS main
program with empty tail call table as place
holder for tcp, udp, icmp...etc XDP DDoS program

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-04-01 13:38:02 -07:00
Vincent Li
8c30bad8f8 xdp-tailcall: add xdp-tailcall init script
xdp-tailcall init script to start/stop XDP
tail call program DNS and TLS SNI on green0
interface

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-01-10 10:56:15 -08:00
Adolf Belka
ee13f80e59 configroot: Add in LOGDROPHOSTILExxx values
- I checked out doing a fresh install of CU184 and found that although the
   LOGDROPHOSTILEIN and LOGDROPHOSTILEOUT entries were selected as "on" the values were not
   in the /var/ipfire/optionsfw/settings file.
- After some investigfation I realised that when I created the LOGDROPHOSTILE split into
   incoming and outgoing I had not added them into the configroot lfs file.
- This patch adds the two entries and this was tested out with a fresh install and
   confirmed to update the settings file.

Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-04-08 17:42:50 +00:00
Peter Müller
726c4b0f4a firewall: Reject outgoing TCP connections to port 25 by default
This will affect new IPFire installations only, implementing a
long-standing BCP for preemptively combating botnet spam. Reject is
chosen over drop to reduce the likelihood for confusion during network
troubleshooting.

Cc: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Tested-by: Peter Müller <peter.mueller@ipfire.org>
2023-11-21 19:04:44 +00:00
Michael Tremer
a0918657c9 network: Drop any traces of ISDN
This has been removed a long time ago and we should probably spend a
little bit more time on keeping the networking code tidy :)

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-12-17 17:20:46 +00:00
Peter Müller
c8274d4cfa configroot: menu.d files do not have to be writable by "nobody"
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-11-18 13:37:51 +00:00
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