Add rate-limit settings to dashboard

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2022-02-19 09:29:35 +01:00
parent e93212fa5d
commit 1d67146b75
2 changed files with 32 additions and 0 deletions

View File

@@ -352,6 +352,13 @@ function addStaticDHCPLease($mac, $ip, $hostname) {
}
pihole_execute("-a -i ".$DNSinterface." -web");
// Add rate-limiting settings
if(isset($_POST["rate_limit_count"]) && isset($_POST["rate_limit_interval"]))
{
// Restart of FTL is delayed
pihole_execute("-a ratelimit " . intval($_POST["rate_limit_count"]) . " " . intval($_POST["rate_limit_interval"]) . " false");
}
// If there has been no error we can save the new DNS server IPs
if(!strlen($error))
{