16 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
Michael Eitelwein
43638be58b No code changes, fixed formatting by replacing spaces with tabs 2016-01-09 20:09:58 +01:00
Michael Eitelwein
1b5b6c91da Fixed detection of firewall chain when bridge is used for ipv6
Signed-off-by: Michael Eitelwein <michael@eitelwein.net>
2016-01-07 19:40:24 +01:00
Michael Eitelwein
f97c6774ef Fix regex to extract firewall chain for ipv6 in showrequestfrom*.dat
If bridged ipv6 is used, $iface is taken from PHYSIN
In the log line the order of fields is "... IN=XY OUT=XY PHYSIN=XY ..."

Signed-off-by: Michael Eitelwein <michael@eitelwein.net>
2016-01-07 15:24:13 +01:00
Michael Eitelwein
9877d28d9e Enable correct display of ipv6 entries in Firewall log pages of web UI.
3 main changes:
 - Fill $iface and $out from PHYSIN and PHYSOUT when looking at bridged packets, othwerwise fill from IN and OUT
 - Recognize ipv4 and ipv6 address style for $srcaddr and $dstaddr
 - Match color coding of tables to pie charts (see seperate patch sent earlier)

I am using the bridged ipv6 setup as proposed in the wiki. I do not think this breaks anything when not using ipv6. So it would be nice to include this even if ipv6 is not officially supported yet. It is quite useful when using the ipv6 setup.

Signed-off-by: Michael Eitelwein <michael@eitelwein.net>
---
2016-01-07 14:00:01 +01:00
Alf Høgemark
fde47f5aef firewalllogcountry.dat: Show green0,blue0, and orange0 as countries
It makes sense to see how many fire wall logs entries are dropped
from the interfaces green0, blue0, and orange0, so this is
displayed as a country. The showrequestfromcountry.dat also
supports filtering based on the interface.
2014-03-01 14:59:18 +01:00
Alf Høgemark
bde7a7d296 showrequestfromcountry.dat: Use language string, and fix links
Define language key for input field.
Fix links for older and newer links.
Indentation fixes.

The code is a copy from showrequestfromip.dat, ideally
we should have merged all three showrequestfrom*.dat files
into one file, but I do not do that now, because it would
really require a rewrite of most of the logic, and I understand
that one does not want to do such changes in 2.x.
2014-03-01 14:59:18 +01:00
Alf Høgemark
e4aac47370 logs.cgi: Add files for showing firewall blocks by country
Add similair functionality as firewalllogip.dat and
firewalllogport.dat, by listing the number of blocks
per country, and provide a details link to show only
the blocked ip addresses from the country.

This is a preliminary prototype.
2014-03-01 14:59:17 +01:00