Commit Graph

136 Commits

Author SHA1 Message Date
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
Stefan Schantl
50494dfd6e logs.cgi/*: Use new location lookup method.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-12-06 14:30:39 +01:00
Alex Koch
111216416f WUI log-section Mail: add support for postfix addon
Expand the regex for the section dmi ("Mail") for /var/log/mail to include the log contents of postfix, in case the addon is installed.

Signed-off-by: Alex Koch <ipfire@starkstromkonsument.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-09-11 16:50:57 +00:00
Alex Koch
2da785f90b WUI log-section Mail: bugfix for dma
The prefix for dmi in /var/log/mail seems to have changed from "dma[<PID>]: " to "dma: ". This results in a bug where no lines are being shown at all in the WUI.

Signed-off-by: Alex Koch <ipfire@starkstromkonsument.de>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-09-11 16:49:45 +00:00
sfeddersen
4f19781d71 BUG12156: GUI cosmetic to show woi logs cleaner
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-09-04 14:35:22 +00:00
Erik Kapfer
830dfc978c suricata: Fixed logs.dat regex for suricata
Fixes: #12084

Since the Suricata regex did not match the messages output, Suricata was not displayed in the "System Logs" section in the WUI.

Signed-off-by: Erik Kapfer <ummeegge@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
2019-05-20 07:12:42 +02:00
Michael Tremer
d51d3c5b93 IPS logging: Fix date comparison for last entry
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-04-12 17:36:54 +01:00
Michael Tremer
2eb0c326da IPS logging: There is no distinguation between suricata & snort required
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-04-12 17:33:39 +01:00
Michael Tremer
19c066b602 IPS logging: Fix reading date
The CGI script only compares mm/dd and does not care about the year.

Suricata, however, logs the year as well which has to be ignored here.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-04-12 17:32:02 +01:00
Stefan Schantl
7bf5b0f221 logs.cgi/ids.dat: Fixup processing dates from logfiles which contains a year
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-03-16 12:27:55 +00:00
Stefan Schantl
dd8d6f5ee8 logs.cgi/ids.dat: Do not call the IDS snort again
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-02-07 09:00:35 +01:00
Stefan Schantl
9f9651e06a logs.cgi/log.dat: Change search pattern from snort to suricata
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2019-01-29 09:00:26 +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
Matthias Fischer
e26a5c4885 Fix typo in 'html/cgi-bin/logs.cgi/log.dat'
Translation string uses capital letter: 'Captive' => 'Captive Portal',

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2019-01-06 07:02:54 +00:00
Stefan Schantl
5508f18c01 logs.cgi/log.dat: Fix pattern to display oinkmaster related messages
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2018-09-11 12:28:28 +02:00
Stefan Schantl
6f3b3cd089 logs.cgi/ids.dat: Dont display/export empty events.
Check if the current processed event has at least datetime and a title.
Otherwise skip it.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2018-09-06 14:04:17 +02:00
Stefan Schantl
63d911cdc5 logs.cgi/ids.dat: Ease list of reported events
Just ease the strict layout by adding a simple line break.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2018-09-06 13:22:18 +02:00
Stefan Schantl
f5ddcad1cc logs.cgi/ids.dat: Adjust code to show suricata events
As default show the events generated by suricata and if
for a certain selected date no suricata log is available
try to fall-back to read the events from the old snort
alert files (if available).

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2018-09-06 12:09:34 +02:00
Stefan Schantl
cb52183c6a Fix merge conflicts during merge of next and the suricata branch 2018-08-23 10:34:17 +02:00
Stefan Schantl
f2f0d61fc1 logs.cgi/ids.dat: Rework linking to external rule documentation.
Check if the sid of a rule belongs to sourcefire and link to the
changed URL for gathering more details. If the sid of the rule belongs
to emergingthreads now link to the emergingthreads documentation.

Fixes #11806.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-08-14 11:48:03 +01:00
Stefan Schantl
c77bd49235 logs.cgi/log.dat: Add support for oinkmaster
This will allow to display the logged output of oinkmaster
via the webinterface.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2018-07-26 11:53:07 +02:00
Matthias Fischer
1b18943b15 urlfilter.dat: Added Older/Newer links at top of page
Hi,

Triggered by:
https://forum.ipfire.org/viewtopic.php?f=4&t=19998#p112930

Added 'Older'/'Newer'-links for better page browsing.

Best,
Matthias

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-01-10 16:55:23 +00:00
Peter Müller
d894ef3615 fix GeoIP lookup in showrequestfromcountry.dat
This issue was caused by the rewrite of the perl GeoIP
library.

Fixes #11571.

Signed-off-by: Peter Müller <peter.mueller@link38.eu>
Tested-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2018-01-07 19:17:11 +00:00
Peter Müller
5b4be0f18f show IDS rule names correctly in WebUI log
The WebUI IDS log did not display the rule name for alerts
where a signature with a five digit number was triggered
(some Emerging Threats signatures are using them).

Changing the regular expression so it will match on five
digit SIDs, too.

Fixes #11519.

Signed-off-by: Peter Müller <peter.mueller@link38.eu>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-11-29 12:03:42 +00:00
Peter Müller
817af14fd2 allow changing remote syslog protocol to TCP
Add option to change remote syslog protocol to TCP, which
is more reliable than UDP, but might be unsupported  on
older syslog servers.

Signed-off-by: Peter Müller <peter.mueller@link38.eu>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-11-28 17:46:01 +00:00
Michael Tremer
00793c27c9 GeoIP: Add lookup function for convenience
Instead of opening the database again for each lookup,
we will read it into memory on first use and every lookup
after that will be coming from cache.

Reviewed-by: Peter Müller <peter.mueller@link38.eu>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-11-13 22:37:19 +00:00
Alexander Marx
6d31cfdd58 Captive-Portal: add logging to syslog
Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
2017-09-22 18:54:44 +01:00
Stephan Feddersen
dec5269370 WIO: patch log.dat to show wio logs
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-08-15 11:45:51 +01:00
Matthias Fischer
d659de88cc Dropped 'dnsmasq' from System log
I think we don't need this anymore...

Best,
Matthias

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-06-14 15:52:33 +01:00
Matthias Fischer
415cbcecfa GUI: Some simple FW-Log cosmetics
I altered 'showrequestfromcountry.dat', 'showrequestfromip.dat' and 'showrequestfromport.dat'
in the same manner as the 'Loggraphs'-Pages in commit

Each 'Details'-page got a unique title.

Furthermore, I added a 'Back'-Button to go back to the previous page. For this, I used
'back.png' from 'wio' (thanks Stephan! ;-) ) since I found no other appropriate image.

'ipinfo.cgi' got a centered 'Back'-Button, too.

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-05-03 17:06:29 +01:00
Matthias Fischer
1bea8be2ce GUI: Some simple FW-Log cosmetics
Fixed the 'details'-Button in 'firewalllogcountry.dat' by adding missing
translation string.

Each 'Loggraphs'-Page got a unique title and a new heading for the corresponding
diagram.

Just cosmetics...

Best,
Matthias

Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2017-04-24 10:53:25 +01:00
Michael Tremer
adb11e90df Always enable asynchronous logging
This patch always enables asynchronous logging which slows
down the system a lot on slow storage and some virtual environments.

It also removes the configuration options in the web
user interface, since this is not configurable any more.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2016-11-29 12:18:41 +00:00
Matthias Fischer
5e818d6afb log.dat: cosmetical upgrade
Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2016-10-25 12:15:07 +01:00
Michael Tremer
9625be6f24 webinterface: Replace dnsmasq with unbound
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2016-08-06 19:30:14 +01:00
Matthias Fischer
5cbfa0140c log.dat: Added entry for 'guardian'
Signed-off-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2016-07-29 13:19:14 +02:00