It is possible to DoS the server with massiv call of simple babelweb.
Here we generate the dumpfile only once per minute and a short description top optimize apache2 on Debian (i don't know what you can do, if you use nginx) Signed-off-by: christiand <fff@chrisi01.de> Signed-off-by: Robert Langhammer <rlanghammer@web.de>
This commit is contained in:
parent
5947228548
commit
509846fa0b
|
@ -13,3 +13,7 @@ The haserl version for slim devices without php
|
||||||
### Requirements
|
### Requirements
|
||||||
* haserl
|
* haserl
|
||||||
* netcat with ipv6 support
|
* netcat with ipv6 support
|
||||||
|
|
||||||
|
## Apache 2 settings
|
||||||
|
To avoid OOM Killer it's usefull to reduce the MaxConnectionsPerChild on apache2. On Debian open /etc/apache2/mods-enabled/mpm_prefork.conf and reduce MaxConnectionsPerChild.
|
||||||
|
Do not use more then 10 MaxConnectionsPerChild per Gigabyte RAM on your System.
|
||||||
|
|
|
@ -23,7 +23,10 @@
|
||||||
<?php
|
<?php
|
||||||
error_reporting(0);
|
error_reporting(0);
|
||||||
$file="/tmp/babeldump";
|
$file="/tmp/babeldump";
|
||||||
shell_exec('echo "dump" | nc ::1 33123 -q 1 > '.$file.'');
|
|
||||||
|
if (filemtime($file) < time()-10) {
|
||||||
|
shell_exec('echo "dump" | nc ::1 33123 -q 1 > '.$file.'');
|
||||||
|
}
|
||||||
|
|
||||||
$file_handle = fopen($file, 'r');
|
$file_handle = fopen($file, 'r');
|
||||||
$set=0;
|
$set=0;
|
||||||
|
|
Loading…
Reference in New Issue