164 Commits

Author SHA1 Message Date
Vincent Li
3eb0ec8b1b wireguard: install UI empty config and 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-07-03 15:56:40 +00:00
Vincent Li
0a726a99ac haproxy: move haproxy to core package
move haproxy to core package

prepare /var/ipfire/haproxy for haproxy UI, use
/var/ipfire/haproxy/haproxy.cfg

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-28 02:44:48 +00:00
Vincent Li
34f9da85dd xdp-sni: add XDP TLS SNI init script xdpsni
add xdpsni init script and enable XDP TLS SNI by default
on first boot and reboot.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-08 02:21:17 +00:00
Vincent Li
07c6172576 xdp-dns: missing xdpdns-settings and domainfile
add the missing config/cfgroot/xdpdns-settings file
and use ENABLE_DNSBLOCK=on by default, so XDP DNS
Blocklist is enabled by default.

also add domainfile so when BPFire reboot first time
and when xdpdns init startup, it will not complain
missing domainfile

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-07 03:01:36 +00:00
Vincent Li
d30a7b2318 xdp-dns: add start/stop init script and settings
add xdpdns init script to load/unload xdp_dns_denylist
program and run xdp_dns_log to log dns query to system log

rm log/configroot log/initscripts to build image

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-02 18:23:44 +00:00
Vincent Li
02724e7427 LoxiLB: enable firewall SNAT for green network
when loxilb is enabled and started, enable the
firewall SNAT for green network so green network
could have initiate outgoing traffic like internet
access.

we can achieve this by restoring firewall SNAT setting
from default /var/ipfire/loxilb/FWconfig.txt when loxilb
start up with --config-path=/var/ipfire/loxilb thanks
to the enhancement addressed in issue:

https://github.com/loxilb-io/loxilb/issues/706

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-07-09 01:47:46 +00:00
Vincent Li
a06eab4ae1 keepalived vs/rs UI: add virtual/real server UI
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-07-05 21:46:07 +00:00
Vincent Li
ed89f965bf keepalived UI: add keepalived UI
BPFire red0 does not support multicast, need to
have unicast peer configured, then the virtual
ipaddress can be added to red0 interface.

the UI requires /var/ipfire/keepalived/runsettings
/var/ipfire/keepalived/settings to be created, so
add them lfs/configroot

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-29 20:55:28 +00:00
Vincent Li
5955087887 keepalived: move keepalived to core package
change keepalived default config to
/var/ipfire/keepalived/keepalived.conf so keepalived WebUI
could read/write the configuration file. also add
/var/ipfire/keepalived directory

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>

keepalived: create /var/ipfire/keepalived
2024-06-29 19:13:10 +00:00
Vincent Li
0c2b510130 add loxilb start/stop init script and settings
when rebuid the image, do:

rm log/configroot
rm log/initscripts

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-05-27 18:23:09 +00:00
Vincent Li
fcdc42ea40 ddos.cgi add DNS DDoS UI
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-18 02:29:27 +00:00
Vincent Li
9a53289a23 ddos.cgi add UDP DDoS WebUI
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-17 00:17:41 +00:00
Vincent Li
8e4e24a9b9 Add XDP DDoS ddos.cgi
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-20 17:42:07 +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