178 Commits

Author SHA1 Message Date
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
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
c16b669813 logs.cgi: Don't ship anything as executable in the sources
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-10-10 17:28:02 +00:00
Vincent Li
587de19dca ovpnclients.dat: Fixes bug 13879
commit 0400a1009439d0ffeddb1e449c8bd656341f5f44
Author: Adolf Belka <adolf.belka@ipfire.org>
Date:   Thu Sep 25 13:12:39 2025 +0200

    ovpnclients.dat: Fixes bug 13879

    Fixes: bug 13879 - CONNECTION_NAME SQL Injection
    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>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-10-10 17:23:05 +00:00
Vincent Li
fd6cd41a95 calamaris.dat: Fixes bug 13886
commit 7dca07fdcf018320bc10eb4d5fcd019dd1a7029a
Author: Adolf Belka <adolf.belka@ipfire.org>
Date:   Thu Sep 25 13:12:46 2025 +0200

    calamaris.dat: Fixes bug 13886

    Fixes: bug 13886 - calamaris.dat Multiple Parameters Command Injection
    Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-10-10 16:29:39 +00:00
Vincent Li
e44245f5fb config.dat: Fixes bug 13890
commit c431d86ab882f1305f831a37c04491a7ae771e28
Author: Adolf Belka <adolf.belka@ipfire.org>
Date:   Thu Sep 25 13:12:48 2025 +0200

    config.dat: Fixes bug 13890

    Fixes: bug 13890 - config.dat REMOTELOG_ADDR Stored Cross-Site Scripting
    Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-10-09 17:28:19 +00:00
Vincent Li
575b5b2535 firewalllogip.dat: Fixes bug 13881
commit 82ad6e9bc3287577b0b72af71ea7651ba416b97b
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Thu Sep 25 17:10:56 2025 +0200

    firewalllogip.dat: Escape pienumber in the right place

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

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

    firewalllogip.dat: Fixes bug 13881

    Fixes: bug 13881 - firewalllogip.dat pienumber 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>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-10-03 22:34:19 +00:00
Vincent Li
a931d86850 firewalllogcountry.dat: Fixes bug 13882
commit 83be14bba7e6867b20d277e52c5bca486aa43162
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Thu Sep 25 17:12:20 2025 +0200

    firewalllogcountry.dat: Escape pienumber in the correct place

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

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

    firewalllogcountry.dat: Fixes bug 13882

    Fixes: bug 13882 - firewalllogcountry.dat pienumber 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>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-10-03 22:23:21 +00:00
Vincent Li
5db52b1717 xdp-sni UI: XDP TLS/SSL SNI log view from UI
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com.
2024-10-09 00:34:07 +00:00
Vincent Li
2c233eac63 xdp-dns log UI: view DNS query log
allow user to view DNS query logged by xdp_dns_log
from UI

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-04 21:36:03 +00:00
Peter Müller
ac225ec698 firewalllog.dat: Update copyright header
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2023-12-30 07:05:49 +00:00
Adolf Belka
f02adfbc74 firewalllog.dat: Fix for bug#13492 - include chain in the exported output
- The regex code does not extract out the chain and so it is missed off from the log output
   when it is exported.
- Changed code tested out on my vm testbed and confirmed to work and include the chain in
   the output.

Fixes: Bug13492
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfre.org>
2023-12-30 07:04:02 +00:00
Robin Roevens
957b6f92b9 Add Zabbix Agent to logviewer
- Configure Zabbix Agent to log to syslog instead of its own logs.
- Remove old zabbix log-dir and logrotate settings from rootfile, lfs
  and install-script.
- Update log.dat to view Zabbix Agent logging from syslog.

Signed-off-by: Robin Roevens <robin.roevens@disroot.org>
2023-05-11 20:03:27 +00:00
Adolf Belka
282e3fe4fb log.dat: Fixes Bug#12922 - adjusts regex to catch hostname for hostname or FQDN
- Most of the packages being searched for in the system logs section only put hostname into
   the logs. However HAProxy puts the FQDN. Reviewing RFC 5424 shows that this is following
   the requirements. The preferred order fromn the RFC is
   1.  FQDN
   2.  Static IP address
   3.  hostname
   4.  Dynamic IP address
   5.  the NILVALUE
- Most of the programs are using option 3 but option 1 is valid for HAProxy
- The regex change filters out the hostname from the FQDN if an extra 'dot' is present

Fixes: Bug#12922
Suggested-by: Michael <ip.fire@die-fritzens.de>
Tested-by: Michael <ip.fire@die-fritzens.de>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
2023-03-11 16:19:41 +00:00
Adolf Belka
452fd239f0 log.dat: Fix bug#12922 - add HAProxy to System Log drop down list
Fixes: Bug#12922
Suggested-by: Michael <ip.fire@die-fritzens.de>
Tested-by: Michael <ip.fire@die-fritzens.de>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
2023-03-11 16:19:40 +00:00
Jon Murphy
4bb389232e log.dat: Fix an error with 'unbound' logging too much data.
- Make regex "non-greedy"
- grab data up to first occurance of "]" and not last occurance of "]"

Signed-off-by: Jon Murphy <jon.murphy@ipfire.org>
2023-03-05 15:01:31 +00:00
Adolf Belka
284ebca057 log.dat: Fixes bug#12950 - adding apcupsd to system logs list
- Patch tested out on my production system that has apcupsd running on it. APCUPS was
   in the list of options in the system logs and entries from apcupsd were extracted
   correctly in the wui.

Fixes: Bug#12950
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
2023-03-04 14:03:45 +00:00
Adolf Belka
a15c20fde9 log.dat: Add NUT entry for System Logs - Fixes bug#12921
- Also aligned all the code entries in %sections and %trsections

Suggested-by: Michael <ip.fire@die-fritzens.de>
Tested-by: Michael <ip.fire@die-fritzens.de>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
2022-09-23 10:36:33 +00:00
Jon Murphy
3da3c1848e urlfilter.dat: change ipcop to ipfire
- Removed remnant from IPCop on URL Filter Logs Export page.

Signed-off-by: Jon Murphy <jon.murphy@ipfire.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
2022-09-11 08:48:00 +00:00
Stefan Schantl
d0ee27149d logs.cgi/ids.dat: Proper display logged events.
Fix the regular expression to proper display the logged IDS events.

Fixes #12899.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-07-27 07:11:04 +00:00
Stefan Schantl
6223e2b498 showrequestfromblocklist.dat: Fix silly typos.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-07-07 17:26:14 +02:00
Rob Brewer
3e0cb28fc6 showrequestfromblocklist.dat: Modify regex for added space in
log-prefix.

Signed-off-by: Rob Brewer <rob.brewer@ipfire.org>
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-07-07 17:26:14 +02:00
Rob Brewer
98d50c03e7 ipblocklist.dat: Do not rely on any theme settings.
The support for themes has been removed since ages, so we
do not need this anymore and may crash the page.

Signed-off-by: Rob Brewer <rob.brewer@ipfire.org>
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-07-07 17:26:14 +02:00
Tim FitzGeorge
c0472dcf2a logs.cgi/log.dat: Allow to show logged ipblocklist messages.
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
Rob Brewer
d6b0613744 ipblocklists.dat: Remove uneccessary and broken module includes.
Signed-off-by: Rob Brewer <rob.brewer@ipfire.org>
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2022-07-07 17:26:14 +02:00
Tim FitzGeorge
cd07e6c659 ipblacklist: WUI Log details page
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
Tim FitzGeorge
09a8d6127a ipblocklist: WUI Log page
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
bad8659d80 Do not mark CGI files as executable, second round
Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-04-23 19:36:57 +00:00
Peter Müller
66c3619872 Early spring clean: Remove trailing whitespaces, and correct licence headers
Bumping across one of our scripts with very long trailing whitespaces, I
thought it might be a good idea to clean these up. Doing so, some
missing or inconsistent licence headers were fixed.

There is no need in shipping all these files en bloc, as their
functionality won't change.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
2022-02-18 23:54:57 +00:00
Michael Tremer
6e40963459 ovpnclients.dat: Fix adjusting input dates
This patch changes that we no longer interpret any dates put in by the
user as UTC. They used to be converted into localtime because, although
they have already been in local time.

This went unnoticed since in Europe we are close (enough) to UTC that
there is no significant discrepancy on the report. However, being in
North America is enough to generate confusing reports.

Reported-by: Paul <kairis@gmail.com>
Fixes: #12768
Tested-by: Jon Murphy <jon.murphy@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2022-02-15 17:59:01 +00:00
Matthias Fischer
8f58e6612b log.dat: Fix an error with 'monit' logging too much data.
Making the regex "non-greedy" fixes an error Jon found.

'monit' logged a whole line from '/var/log/messages' where it should only log the first part.

Reference:
https://www.ultraedit.com/support/tutorials-power-tips/ultraedit/non-greedy-perl-regex.html

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
2022-01-25 17:33:00 +00:00
Matthias Fischer
0b2aa5173d Patch 'log.dat' to show 'monit' messages in system logs
Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Acked-by: Michael Tremer <michael.tremer@ipfire.org>
2021-11-19 07:07:48 +01:00
Stefan Schantl
ca1f4a07ab firewalllog.dat: Proper display protocol names.
In some cases iptables logs the protocol number instead of the name.
When accessing the logs via the WUI, this number has been displayed as used
protocol, which is very hard to read and understand.

This commit adds a new function to the general-functions.pl, which
generates a hash to translate the protocol number into the protocol
name.

Fixes #11282.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2021-09-02 09:21:16 +00:00
Jonatan Schlag
8186b37230 Hardcode theme to ipfire
This disables the theme support and makes it impossible to use any other
themes than the ipfire default theme.

The only intention of this patch is to hardcode the theme to ipfire.
To change any cgi we have is an ugly way, but the only way to do this
fast. The colour handling needs certainly to be improved as well, but
this will and should be done in other patches.

Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-04-08 10:11:34 +00:00
Stefan Schantl
cdfbef5de7 logs.cgi/ids.dat: Change url to sid documentation site.
Fixes #12596.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-04-06 09:57:13 +00:00
Stefan Schantl
5ae1188589 logs.cgi/showrequestfromcountry.dat: Proper lookup country code.
Seems to be a code fragment has been left while switching to
libloc. Now call the right function from location-functions.pl.

Fixes #12599.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Reviewed-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2021-04-06 09:56:15 +00:00
Stefan Schantl
07e42be978 Adjust CGI files to work with latest location-function.pl changes.
Fixes #12515.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-11-09 14:07:21 +00:00
Michael Tremer
13e455aec7 samba: Log to syslog
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2020-10-13 17:06:16 +01:00
Stefan Schantl
4f6d5b3ef3 logs.cgi/showrequestfromcountry.dat: Use location-functions.pl
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2020-06-12 18:44:29 +02:00
Stefan Schantl
43970d7cfc logs.cgi/firewalllogip.dat: Use location-functions.pl
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2020-06-12 18:42:23 +02:00
Stefan Schantl
1b024e999e logs.cgi/firewalllogcountry.dat: Use location-functions.pl
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2020-06-12 18:09:46 +02:00
Stefan Schantl
e4f1e36c9f logs.cgi/firewalllog.dat: Use location-functions.pl
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2020-06-12 18:07:55 +02:00
Stefan Schantl
cf45236b2a Merge branch 'next' of ssh://git.ipfire.org/pub/git/ipfire-2.x into next-switch-to-libloc 2020-05-26 19:02:48 +02:00
Michael Tremer
75bb55e716 openvpn: Create database schema if not exists
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-05-26 11:12:23 +00:00
Stefan Schantl
8b58dbf32a Merge branch 'switch-to-libloc' into next-switch-to-libloc 2020-05-25 19:58:54 +02:00
Michael Tremer
186c0ddd91 OpenVPN Log: Add connection duration
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-05-01 19:15:25 +00:00
Stefan Schantl
b10612e8ba ovpnclients.dat: Align traffic values to the right side.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-05-01 19:14:58 +00:00
Stefan Schantl
7b54c0fb7b ovpnclients.dat: Fix type in received.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-05-01 19:14:48 +00:00
Stefan Schantl
e1cc1e6cb9 ovpnclients.dat: Do not perform DB actions if there is an error message.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-05-01 19:14:21 +00:00
Stefan Schantl
0f195a5305 ovpnclients.dat: Display error when the to date is not later than the from date.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-05-01 19:14:11 +00:00