1
0
Fork 0
mirror of https://github.com/pavel-odintsov/fastnetmon synced 2024-06-01 22:16:27 +02:00

Add avility to configure 'Unblock only when attack finished' with configuration file; Closes #370

This commit is contained in:
Pavel Odintsov 2015-08-14 11:37:56 +02:00
parent bda55c9c33
commit 391f2e9464
2 changed files with 12 additions and 0 deletions

View File

@ -28,6 +28,10 @@ ban_details_records_count = 500
# If you set 0 here it completely disables unban capability
ban_time = 1900
# We could check 'is attack still going' before triggering unban callback with this option
# If attack still going we will check it each run of unban watchdog
unban_only_if_attack_finished = on
# With this variable you could enable per subnet speed meters
# For each subnet from subnet list we will track speed in bps and pps for both directions
enable_subnet_counters = off

View File

@ -825,6 +825,14 @@ bool load_configuration_file() {
}
}
if (configuration_map.count("unban_only_if_attack_finished") != 0) {
if (configuration_map["unban_only_if_attack_finished"] == "on") {
unban_only_if_attack_finished = true;
} else {
unban_only_if_attack_finished = false;
}
}
if(configuration_map.count("graphite_prefix") != 0) {
graphite_prefix = configuration_map["graphite_prefix"];
}