Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
MaxKeepAliveRequests directive
Syntax: MaxKeepAliveRequests number
Default: MaxKeepAliveRequests 100
Context: server config
Status: core
Compatibility: Only available in Apache 1.2 and later.
The MaxKeepAliveRequests directive limits the number of requests allowed per connection when KeepAlive is on. If it is set to "0", unlimited requests will be allowed. We recommend that this setting be kept to a high value for maximum server performance. In Apache 1.1, this is controlled through an option to the KeepAlive directive.
..next to that, if you run Apache in standalone mode, and want more (finegrained) control, you could look for mod_limitipconn, mod_bandwidth, mod_throttle or mod_bandwidthshare. If for some odd reason you run it tru Xinetd, xinetd can do it's own throttling/limiting. Also Iptables, if you would want to use it for that, can do limiting tru the iplimit module.
What you definately not want is the stuff under /etc/security, cuz that's PAM related, and mostly has to do with restrictions for local users like (u)limiting, time/remote host limits etc etc.
we have about 250 websites on this server with a few heavy users but most low to moderate users.
I did some testing and noticed that after entering the ips that kept showing up over 20 times each I put into my security limits.conf file the loads on the server reduced dramatically. I did further testing and removed those ips and then set the httpd.conf file to "Keep alive On"
the loads on the server shot up 6 - 12 times to what it had been running at,
I have been setting those ips on limits.conf for the previous 24 hours and no complaints of users having any connection problems.
unspawn I will have a look at mod_limitipconn and see if that can work better that my current setup.
thankyou.
#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300
#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive Off
#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 250
#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 15
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.