11806 Commits

Author SHA1 Message Date
Vincent Li
4382757dff unbound: upgrade to 1.22.0
there is issue with DNS unable to resolve some domain [0], update the
unbound to 1.22.0, the issue is resolved, not sure why it broke though.

[0]: https://github.com/vincentmli/bpfire/issues/112

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-12-03 20:02:09 +00:00
Vincent Li
d38d3d5d6e dns: add new unbound-dhcp-leases-client script to send events to the bridge
commit 7397809eb4
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Fri May 10 16:06:23 2024 +0100

    unbound-dhcp-leases-client: A new script to send events to the bridge

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

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-12-03 19:59:48 +00:00
Vincent Li
2ab05a1533 wireguard: Add wireguard handshake log UI
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-11-15 19:48:38 +00:00
Vincent Li
704a226f1f libbpf-bootstrap: add wg_handshake to log wireguard handshake message
commit 6424fa8757a3a8fd8fde1be6935a1984abe8fdb2 (HEAD -> loongfire-port, origin/loongfire-port)
    Author: Vincent Li <vincent.mc.li@gmail.com>
    Date:   Fri Nov 7 19:17:59 2025 -0800

        wg_handshake: log wireguard handshake message

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

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-11-15 19:39:00 +00:00
Vincent Li
04033ad1a5 xdp-tools: rebase on upstream 1.5.7 and add tc classifier
commit ced17feca631f6963a2439f41ef09a7db048f316 (HEAD -> main)
    Author: Vincent Li <vincent.mc.li@gmail.com>
    Date:   Mon Oct 20 21:28:17 2025 -0700

        tc-basic-classifier: fix tcp port Endianess bug by AI

        AI generated class_filter program stored the tcp port in network order,
        but in bpf program the tcp port is converted to host order, and result in
        tcp port lookup failure, unable to get the correct classid, fail to do rate
        classification.

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

    commit a18fe4be0374ab1efb21c1228a5c5790ded7636e
    Author: Vincent Li <vincent.mc.li@gmail.com>
    Date:   Mon Oct 20 19:15:34 2025 -0700

        tc-basic-classifier: classify port and IP from bpf map

        add port and IP rate classification based on bpf map so user could
        add or remove port/IP rate classification dynamically at run time

        since TC class works on egress direction, so port rate classification
        works on red0 egress, and IP rate classification works on green0 egress

        port rate classification:

        class_filter -a -b ./class_filter.bpf.o -i red0 -v

        class_filter -i red0 --add-port 8080:10:80mbit
        class_filter -i red0 --add-port 8081:20:40mbit

        class_filter -i red0 --delete-port 8080

        class_filter -i red0 --list-ports

        IP rate classification:

        class_filter -a -b ./class_filter.bpf.o -i green0 -v

        class_filter -i red0 --add-ip 192.168.1.0/24:40:30mbit
        class_filter -i red0 --delete-ip 192.168.1.0/24

        class_filter -i red0 --list-ips

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

    commit 12280ef22ae49f75eda047144ed3e9dc0f73e04a
    Author: Vincent Li <vincent.mc.li@gmail.com>
    Date:   Fri Oct 17 19:45:07 2025 -0700

        tc-basic-classifier: add user space program

        the bpf skel header is generated only if USER_TARGETS
        is added in Makefile, so add a dummy user space program.

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

    commit fe5cc1814af4c995f61ec08708110deef7a65c45
    Author: Vincent Li <vincent.mc.li@gmail.com>
    Date:   Fri Oct 17 19:28:45 2025 -0700

        xdp-tools: rebase on upstream xdp-tools main branch

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

    commit 7dee7fd954c06a3c58bedbb5561b9ee65c3f749f
    Author: Vincent Li <vincent.mc.li@gmail.com>
    Date:   Fri Oct 17 18:39:59 2025 -0700

        tc-basic-classifier: rename the class filter

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

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-10-21 01:47:29 +00:00
Vincent Li
3a815d1814 fwhosts.cgi: Fix for bug 13876 & bug 13877
sync IPFire fwhosts.cgi

commit 2398cc431a3fb2cd4141b6a846f0cd0742f6a97c
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Thu Sep 25 17:05:32 2025 +0200

    fwhosts.cgi: Escape PROT in the right place

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

commit ad995081302f6b28ea11c74e56306d94a7bee076
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Thu Sep 25 17:02:18 2025 +0200

    fwhosts.cgi: Check country code before proceeding

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

commit a2c624b99dbcecb469e6001505731049ef5cbbd3
Author: Adolf Belka <adolf.belka@ipfire.org>
Date:   Thu Sep 25 13:12:37 2025 +0200

    fwhosts.cgi Fix for bug 13876 & bug 13877

    Fixes: Bug 13876 savelocationgrp COUNTRY_CODE Stored Cross-Site Scripting
    Fixes: Bug 13877 saveservice PROT Stored Cross-Site Scripting
    Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
    Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 798556ec29207d5131a7600d5489f1ee92a7b87a
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Mon Jun 23 17:16:57 2025 +0000

    fwhosts.cgi: Move the tooltip into the usage counter

    This will clutter the page less as we don't have any good icon sets.

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
    Tested-by: Adolf Belka <adolf.belka@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 61b277aa9c578a9a69e552f593a8bde421b811bc
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Mon Jun 23 17:16:56 2025 +0000

    fwhosts.cgi: Don't show anything if a host/group is unused

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

commit ca811a746a79f0e02cfb780cbd4543a057131e3a
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Mon Jun 23 17:16:55 2025 +0000

    fwhosts.cgi: Remove whitespace issues

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

commit 5511d94ed0d8ea6fd372d52cba515b4d6726abed
Author: Peer Dietzmann <dietzmann@brecht-schule.hamburg>
Date:   Mon Jun 23 17:16:54 2025 +0000

    fwhosts.cgi: Show in which firewall rule objects are being used

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
    Tested-by: Adolf Belka <adolf.belka@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 341eb00a821c4254ddd04968beed2e98e5a33aff
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Sat May 3 15:10:16 2025 +0200

    fwhosts.cgi: Correctly show IP addresses for WireGuard RW peers

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

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-10-09 17:23:25 +00:00
Vincent Li
a81b1f8f2b arpwatch: add arpwatch as common package
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-09-25 15:37:51 +00:00
Vincent Li
ca64eb8761 initscripts: add kdump scripts
this is initial kdump and kdump scripts, it looks when run kdump-config
load the first time, the kdump kernel can be loaded, and test crash dump
with echo c > /proc/sysrq-trigger result in system hang forever, then
had to power reset. after power reset, kdump-config load could no longer
load the kdump kernel, errors out with:

[root@bpfire-3 crash]# kdump-config load
cp: cannot stat '/etc/kdump/sysctl.conf': No such file or directory
Creating symlink /var/lib/kdump/vmlinuz.
ln: failed to create symbolic link '/var/lib/kdump/vmlinuz': No such file or directory
Unable to locate kernel hook ... failed!
Can't find kernel text map area from kcore
Cannot load /boot/vmlinuz-6.15.6-ipfire
failed to load kdump kernel ... failed!

so kdump is not working properly, but add the kdump scripts anyway, the
issue can be investigated later in future.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-08-22 18:18:11 +00:00
Vincent Li
8d0051d8f6 kernel: add kernel config for kdump
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-08-22 16:01:57 +00:00
Vincent Li
06359e6db4 grub: add crashkernel parameter for kdump
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-08-22 16:01:16 +00:00
Vincent Li
4045f9fbc2 makedumpfile: add makedumpfile for kdump tool
makedumpfile build by default in BPFire use static libdw.a, libelf.a but
libdw.a, libelf.a are not build with zstd which makdedumpfile static
build requires, so build makedumpfile dynamically, see [0].

[0]: https://github.com/vincentmli/bpfire/issues/109

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-08-16 02:58:33 +00:00
Vincent Li
1475ef5093 kexec-tools: add kexec-tool for kernel dump
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-08-15 16:05:19 +00:00
Vincent Li
351e665042 wireguard-functions.pl: backport two fixes from ipfire
commit 68a3334413efb1a963b7cc6c6dca1ec0126e1cc1
    Author: Michael Tremer <michael.tremer@ipfire.org>
    Date:   Fri Jul 18 08:42:12 2025 +0000

        wireguard-functions.pl: Automatically skip IPv6 subnets

        Since we do not support this and some VPN providers generate
        configuration files that send any data over to them, we simply ignore
        any IPv6 subnets.

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

    commit f7565a885b55384a64edd8bd73079143a04da519
    Author: Michael Tremer <michael.tremer@ipfire.org>
    Date:   Fri Jul 18 09:57:34 2025 +0000

        wireguard-functions.pl: Remove any carriage returns on import

        Some files might include carriage returns which won't be removed by
        chomp() on Linux. To be extra safe, we remove them manually.

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

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-23 12:49:37 +00:00
Vincent Li
c7e72c51bf wireguard: add IP on road warrior interface wg0
Choose one IP from client pool and add it to road warrior interface
wg0 so road warrior VPN client could reach firewall through the VPN

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-20 23:40:09 +00:00
Vincent Li
67d1b8a4e9 network-functions.pl: Add function to extract prefix
wireguard-functions.pl requires get_prefix

commit 0e55d27737
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Wed Mar 20 12:09:58 2024 +0100

    network-functions.pl: Add function to extract prefix

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

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-04 17:17:07 +00:00
Vincent Li
a989b976cb configroot: add missing set_defaults sub
missing set_defaults sub result in error when generate
flash image during build after add wireguard UI

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-04 14:44:09 +00:00
Vincent Li
97e543817a firewall: Allow WG traffic when the firewall is in permissive mode
commit d6868ae94c63d0f708985e6bb6604a4bd40cf1a8
    Author: Michael Tremer <michael.tremer@ipfire.org>
    Date:   Fri Sep 6 18:20:46 2024 +0200

        firewall: Allow WG traffic when the firewall is in permissive mode

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

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-04 03:40:37 +00:00
Vincent Li
d270ada82c firewall: Add support for WireGuard peers to groups
commit 1de96a83d6d6cec5d4d3eda1792aa80bfbd8fafe
    Author: Michael Tremer <michael.tremer@ipfire.org>
    Date:   Wed Apr 23 12:35:52 2025 +0200

        firewall: Add support for WireGuard peers to groups

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

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-04 03:25:56 +00:00
Vincent Li
2580c06cb7 wireguard.cgi: missed normalize sub in header.pl
commit 37174e29de670a33f9be4b90c88b0a96c695dad1
    Author: Michael Tremer <michael.tremer@ipfire.org>
    Date:   Fri Sep 27 17:55:46 2024 +0200

        wireguard.cgi: Normalize filenames

        This is because Windows clients won't import any configurations that
        have spaces in the filename. Therefore we replace it and remove anything
        else unwanted on the way.

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

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-03 18:01:07 +00:00
Vincent Li
aff726b928 firewall: Add WireGuard RW to the UI
commit 5a1c02df8973b3acc5c3101a94e86fe6df4b43b6
    Author: Michael Tremer <michael.tremer@ipfire.org>
    Date:   Thu Sep 12 19:39:26 2024 +0200

        firewall: Add WireGuard RW to the UI

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

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-03 17:56:36 +00:00
Vincent Li
6ed934dbfc configroot: add pool address normalization sub
wireguard.cgi needs pool address normalization

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-03 17:55:04 +00:00
Vincent Li
638483ff08 wireguard.cgi: Add CGI to configure wireguard
commit 06dbc836a47160d51ab10f8b9d4ca356beaa7cdb
    Author: Michael Tremer <michael.tremer@ipfire.org>
    Date:   Tue Apr 16 18:06:47 2024 +0200

        wireguard.cgi: Add a basic CGI to configure the global settings

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

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-03 17:03:32 +00:00
Vincent Li
3710ff2af7 misc-progs: Add wireguardctrl
commit f552e23da404adf4555299c887a0279016323df4
    Author: Michael Tremer <michael.tremer@ipfire.org>
    Date:   Wed Apr 17 17:13:32 2024 +0000

        misc-progs: Add wireguardctrl

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

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-03 16:12:31 +00:00
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
2d55d3c672 wireguard: Add wireguard initscript
commit b78ba3624f0a11c060ad06dbd65741b82684d93e
    Author: Michael Tremer <michael.tremer@ipfire.org>
    Date:   Tue Apr 16 16:17:59 2024 +0200

        wireguard: Add initscript

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

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-03 15:43:15 +00:00
Vincent Li
dd9a60e720 wireguard-tools: backport IPFire wireguard-tools
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-02 16:04:52 +00:00
Vincent Li
4e665f6a3c dnsdist: correct xsk sample config
when use /etc/rc.d/init.d/dnsdist to start dnsdist with the sample
xsk config, it results in startup error [0]. Correct the xsk sample config.

[0]: https://github.com/PowerDNS/pdns/discussions/15713

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-06-25 16:17:36 +00:00
Vincent Li
b78ee945cd xdp-tools: add dnsdist XDP program
upgrade xdp-tools to 1.5.5 and add dnsdist_xdp.bpf.o
for dnsdist xsk AF_XDP

xdp-loader load green0 -P 90 -p /sys/fs/bpf/dnsdist \
    -n xdp_dns_filter /usr/lib/bpf/dnsdist_xdp.bpf.o

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-06-21 17:40:40 +00:00
Vincent Li
d81f2b838e dnsdist: add sample xsk AF_XDP config
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-06-21 17:37:01 +00:00
Vincent Li
e51ee79752 dnsdist: move dnsdist to core package
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-06-21 17:32:06 +00:00
Vincent Li
2e3ea0ae64 pwru: ebpf pwru addon for network diagnosis
preparation for pwru:

mount -t debugfs none /sys/kernel/debug
echo 0 > /proc/sys/kernel/kptr_restrict

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-06-11 23:00:56 +00:00
Vincent Li
bdee533f04 libbpf-bootstrap: base for importing libbpf-tools
add libbpf-bootstrap as base to import bcc libbpf-tools

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-05-23 20:05:48 +00:00
Vincent Li
465f1e2328 Perl: add Net-ISP-Balance addon
Perl Net-ISP-Balance can be used for ISP Internet connection
load balancing [0], it depends on Net-Netmask module.

[0]: https://lstein.github.io/Net-ISP-Balance/

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-05-21 15:53:12 +00:00
Vincent Li
3b672339ef keepalived: remove keepalived.conf.sample
keepalived configuration is moved to /var/ipfire/keepalived

fix: https://github.com/vincentmli/BPFire/issues/92
Reported-by: Harvey Li <lhw365@gmail.com>
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-05-21 15:53:12 +00:00
Vincent Li
33f4a2b1b1 haproxy: remove /etc/haproxy/haproxy.cfg
remove /etc/haproxy/haproxy.cfg since lfs/haproxy
installed haproxy.cfg to /var/ipfire/haproxy

fix: https://github.com/vincentmli/BPFire/issues/92
Reported-by: Harvey Li <lhw365@gmail.com>
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-05-21 15:53:12 +00:00
Vincent Li
93a5a7af7b xdp-tools: rebased on upstream 1.5.4
included recent changes:

1 fix for xdp-dns for [0]
2 tc-loader to load tc ebpf program

[0]: https://github.com/vincentmli/BPFire/issues/87

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-05-14 20:35:57 +00:00
Vincent Li
25421aed06 logo: add missing bpfire logo
commit f89feeb19 "kernel: use BPFire logo in kernel" replaced
ipfire logo with bpfire logo, but forgot to add the bpfire logo
file and remove the ipfire logo file

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-05-10 03:38:17 +00:00
Vincent Li
e2856c1c7e loxilb-tc: remove loxilb-tc
loxilb 0.9.8 load tc BPF program through libbpf
so iproute tc utility is not needed.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-03-03 17:19:15 +00:00
Vincent Li
0e2047f080 linux: enable bootparam hardlockup/softlockup
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-02-23 04:36:14 +00:00
Vincent Li
f3881747be loxilb: change default loxilb firewall setting
loxilb 0.9.8 requires --egress flag for firewall
rule to masquerade/SNAT GREEN network source IP
for Internet access. to access host in RED network
another firewall rule is required.  see [0].

[0]: https://github.com/loxilb-io/loxilb/issues/957

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-02-10 16:44:58 +00:00
Vincent Li
2daee785d4 lunatik: remove lunatik
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-02-04 17:07:13 +00:00
Vincent Li
0ba17ebe5d lfs/linux: perf tool install missed
perf tool is built alone with Linux, but
missed to install the perf tool in image

fix: https://github.com/vincentmli/BPFire/issues/65

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-12-03 03:46:09 +00:00
Vincent Li
1bfeb4b322 lfs/linux: enable CONFIG_FPROBE for multi kprobe
pwru is an utility to trouble shoot network issue,
and to speed up pwru kprobe attachement, kernel needs
to have CONFIG_FPROBE.

running pwru also result in:

Opening kprobe-multi: invalid argument \
(missing kernel symbol or prog's AttachType not AttachTraceKprobeMulti?)

need following to avoid above invalid argument

    echo -1 > /proc/sys/kernel/perf_event_paranoid
    echo 0 > /proc/sys/kernel/kptr_restrict

see https://github.com/cilium/pwru/issues/460

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-12-03 02:44:14 +00:00
Vincent Li
09c182c75a xdp-tools: XDP UDP DDoS for online game protection
UDP DDoS has pattern of flooding game server with
random source IP and UDP with random payload. game
server UDP traffic requires certain payload
pattern, so this XDP program can serve as example
to stop UDP DDoS attack with UDP payload that does not
match game UDP traffic payload pattern.

without UDP DDoS protection, under DDoS attack:

BPFire UI RED Traffic: in 9xx Mbit/s.

with UDP DDoS protection, under DDoS attack:

BPFire UI RED Traffic: in 1xx Mbit/s.

Tested-by: Muhammad Haikal <eykalpirates@gmail.com>
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-11-27 18:32:10 +00:00
Vincent Li
20c65fa4ec kernel: enable signature force config
Kernel module signature force is disabled
for lunatik kernel module build, enable it
for now.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-11-06 20:28: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
25da9eb467 ddos: Load/Attach XDP DDoS when reboot
fix: https://github.com/vincentmli/BPFire/issues/58

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-22 18:48:11 +00:00
Vincent Li
8b29912521 suricata-xdp: resolve memlock and stack smashing
suricata XDP support requires xdp-tools with
libbpf 1.4 to resolve stack smash issue.

also workaround memlock operation not permitted
by running suricata as root since load/attach
XDP program requires root privilige anyway.

see: https://github.com/vincentmli/BPFire/issues/54

Usage scenario:

since suricata IPS XDP capture mode works as
layer 2 bridge, BPFire netfilter firewall, NAT
IP route  will be bypassed. no IP address should
be assigned to red0 and green0 interface.

172.16.1.0/24          inline              172.16.1.0/24
red network<-->red0(xdp)<-->green0(xdp)<-->green network

we can run setup command to assign IP/Mask 0.0.0.0/0.0.0.0
to red0 and green0, then reboot BPFire, BPFire DHCP
will stops working after reboot. green network client
can get DHCP IP from upstream dhcp server.

start suricata manually

suricata -c /etc/suricata/suricata-xdp.yaml --af-packet
xdp_filter.bpf program will be attached to red0 and gree0
interface

not sure if we should add GUI for suricata XDP capture mode
since this is not common use case.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-18 19:47:59 +00:00
Vincent Li
40c097ff8a libbpf: upgrade to 1.4.6
xdp-tools libxdb requires libbpf 1.4.0 and above
to fix stack smashing issue.

see: https://github.com/xdp-project/xdp-tools/issues/446

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-18 17:16:09 +00:00
Vincent Li
1eceb143ed suricata: add suricata ebpf xdp capture mode
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-17 02:11:19 +00:00