Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Anyways, I'm running an LAMP from home (just over my LAN), I want to be able to limit the number of concurrent connections. I'm trying to test out the Slowloris denial of service vulnerability for myself (just to see what happens), and I was wondering if it is possible to do such a thing?

share|improve this question
add comment

1 Answer

Use apache's MaxClients Directive in your httpd configuration (/etc/httpd/conf.d/httpd.conf):

Description: Maximum number of connections that will be processed simultaneously Syntax: MaxClients number Default: See usage for details Context: server config Status: MPM Module: beos, prefork, worker

The MaxClients directive sets the limit on the number of simultaneous requests that will be served. Any connection attempts over the MaxClients limit will normally be queued, up to a number based on the ListenBacklog directive. Once a child process is freed at the end of a different request, the connection will then be serviced.

For non-threaded servers (i.e., prefork), MaxClients translates into the maximum number of child processes that will be launched to serve requests. The default value is 256; to increase it, you must also raise ServerLimit.

For threaded and hybrid servers (e.g. beos or worker) MaxClients restricts the total number of threads that will be available to serve clients. The default value for beos is 50. For hybrid MPMs the default value is 16 (ServerLimit) multiplied by the value of 25 (ThreadsPerChild). Therefore, to increase MaxClients to a value that requires more than 16 processes, you must also raise ServerLimit.

share|improve this answer
    
How do I do that? –  Bob Sep 25 '11 at 7:45
    
How would I do that on something like Ubuntu? What do I type in or where do I browse to to edit files? –  Bob Sep 25 '11 at 7:49
    
The apache config file is usually /etc/httpd/conf.d/httpd.conf. If it's not there run 'locate httpd.conf' and it should tell you. –  Andrew Case Sep 25 '11 at 14:46
    
For Ubuntu it's /etc/apache2/apache2.conf –  HTTP500 Jul 11 '12 at 18:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.