Commit Graph

29 Commits

Author SHA1 Message Date
Stefan Schantl
891ba055f2 guardian.cgi: Use "getipstat" binary.
Rework the GetBlockedHosts() to use the "getipstat" binary
instead of the not longer available "guardianctrl" binary.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2016-07-29 13:17:56 +02:00
Stefan Schantl
af6856afc4 guardian.cgi: Send commands through socket connection.
The guardianctrl binary does not longer exists, use
the Guardian::Socket module to send various commands
by using the provided socket client.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2016-07-29 13:17:56 +02:00
Stefan Schantl
5295899104 guardian.cgi: Adjust code for generating the config file.
The config file format and values have been changed, so the
code to do the generation has to be adjusted.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2016-07-29 13:17:56 +02:00
Stefan Schantl
d530537998 guardian.cgi: Drop option for configure the path to the snort alertfile.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2016-07-29 13:17:56 +02:00
Stefan Schantl
723648ac92 guardian.cgi: Rename hash keys for enabled modules.
Rename the hash key names of enabled parser modules,
(services which should be monitored by guardian) to
keep the same name sheme than in the guardian config
file.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2016-07-29 13:17:56 +02:00
Stefan Schantl
b5f7d90327 guardian.cgi: Adjust CGI to use Locale::Codes::Country.
The module has been renamed some time ago.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2016-07-29 13:17:56 +02:00
Stefan Schantl
eff1feb8c7 guardian.cgi: Disable debugging.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2016-07-29 13:17:55 +02:00
Matthias Fischer
b1597f879c guardian.cgi: Suppress warnings for ${Header::colourgreen} variable.
Reference #10748.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2016-07-29 13:17:55 +02:00
Matthias Fischer
6a153ecdac guardian.cgi: Fix unititalized value "GUARDIAN_ENABLE_OWNCLOUD".
When the owncloud addon is not installed, this value was not
initialized correctly.

Reference #10748.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2016-07-29 13:17:55 +02:00
Matthias Fischer
922ddf0ef6 guardian.cgi: Use variable $pid instead of array element.
This will prevent from a lot of perl suggestions in the
apache error log.

Reference #10748.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2016-07-29 13:17:55 +02:00
Stefan Schantl
bfb860ceb7 guardian.cgi: Fix path to meta-owncloud.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2016-07-29 13:17:55 +02:00
Stefan Schantl
28981fac68 guardian.cgi: Add configure options for owncloud.
The related options only will be displayed when the owncloud addon
has been installed.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2016-07-29 13:17:55 +02:00
Stefan Schantl
36dbcf2e43 guardian.cgi: Allways read-in settings.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2016-07-29 13:17:55 +02:00
Stefan Schantl
c973d6da10 guardian.cgi: Some more input validation.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2016-07-29 13:17:55 +02:00
Stefan Schantl
473c725721 guardian.cgi: Correct indentation when writing out the config file.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2016-07-29 13:17:55 +02:00
Stefan Schantl
4a7fc9f634 guardian.cgi: Add dropdown for PriorityLevel selection.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2016-07-29 13:17:55 +02:00
Stefan Schantl
96655fa6b7 guardian.cgi: Fix and improve input validation.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2016-07-29 13:17:55 +02:00
Stefan Schantl
f8c3bfe050 guardian.cgi: Reload guardian if config or the ignorelist changes.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2016-07-29 13:17:55 +02:00
Stefan Schantl
a35a066845 guardian.cgi: Add option to configure the BlockCount.
Some small code fixes.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2016-07-29 13:17:55 +02:00
Stefan Schantl
06ff7e28d7 guardian.cgi: Accidently hardcoded some descriptions.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2016-07-29 13:17:55 +02:00
Stefan Schantl
7899718f04 guardian.cgi: Add dropdown to select the used loglevel.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2016-07-29 13:17:55 +02:00
Stefan Schantl
a67b3e2dc5 guardian.cgi: Remove code for options which have been dropped from guardian.
Guardian does not longer require the information for the red interface from
the configfile.

Guardian does not longer support a targetfile.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2016-07-29 13:17:55 +02:00
Stefan Schantl
26fcd31e1f guardian.cgi: Add options to enable/disable some built-in functions from guardian.
This commit allows to enable or disable the monitoring of the snort alertfile
and to switch off the blocking of SSH and HTTPD Brute-force attempts.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2016-07-29 13:17:55 +02:00
Stefan Schantl
d2fea55e09 guardian.cgi: Remove code for Blockinterfaces.
We don't need this code anymore because we dropped interface support
from guardian.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2016-07-29 13:17:55 +02:00
Stefan Schantl
1d5702a7c3 guardian.cgi: Connect subboxes with input elements to the main boxes.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2016-07-29 13:17:55 +02:00
Stefan Schantl
5f462919d9 guardian.cgi: Sort blocked IP addresses.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2016-07-29 13:17:55 +02:00
Stefan Schantl
8b8413e566 guardian.cgi: Add hyperlink to ipinfo page for blocked hosts.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2016-07-29 13:17:55 +02:00
Stefan Schantl
7f7285911c guardian.cgi: Autodetect the used interface for red.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2016-07-29 13:17:55 +02:00
Stefan Schantl
01dbccb11e guardian.cgi: New page to configure and interact with guardian.
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
2016-07-29 13:17:55 +02:00