Commit Graph

170 Commits

Author SHA1 Message Date
Michael Tremer
4ac5aaf635 log.dat: Remove stupid line breaks and update markup of table
Reported-by: Stephen Cuka <stephen@firemypi.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-09-23 14:50:32 +02:00
Adolf Belka
90227a65b4 log.dat: Fix bug13762 - ssh logins not shown in system logs
- With the update of openssh to version 9.8 in CU187 the daemon was changed from sshd to
   sshd-session. Therefore the log.dat no longer finds any info related to the logins.
- This updates the section regex to look for both sshd and sshd-session.
- Tested out on my vm system and confirmed to work.
- This fix will make available all previous log info for sshd-session in the messages log
   as it continued to be stored, just could not be read by the WUI system log.

Fixes: bug13762
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Tested-by: Bernhard Bitsch <bbitsch@ipfire.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2024-09-22 14:16:43 +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
Stefan Schantl
c7d55d7fbd ovpnclients.dat: Display a notice if there are no entries.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-05-01 19:13:57 +00:00
Stefan Schantl
1242cb0134 ovpnclients.dat: Convert timestamps into localtime.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-05-01 19:13:46 +00:00
Stefan Schantl
d5b6023c32 ovpnclients.dat: Add table header.
The header will be dynamically generated, according the items which will
be displayed.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-05-01 19:13:28 +00:00
Stefan Schantl
8615383823 ovpnclients.dat: Display traffic details in a human-readable format.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-05-01 19:12:51 +00:00
Stefan Schantl
6317d55c4a ovpnclients.dat: Fix hard coded language string
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-05-01 19:12:28 +00:00
Michael Tremer
70e1d58745 OpenVPN: Fix query when selecting sessions only
Previously some sessions were selected which did not qualify
for the search.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-05-01 19:12:10 +00:00
Stefan Schantl
3e10b3de4a openvpn: Add WUI page for client usage statistics
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2020-05-01 19:11:50 +00:00
Stefan Schantl
95bb1a5c95 logs.cgi/showrequrestfromcountry.dat: Use new location lookup method.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-12-06 14:42:09 +01:00