Apache module mod_limitipconn.c is a module which allows web server administrators to limit the number of simultaneous downloads permitted from a single IP address.
To set the IP limit on the server using mod_security.
Check apache version first on server.
Go to the below path
Download the mod_limitpconn using the below link. I am having apache version 2.2.22. As per your apache version download the file.
Untar the file
tar -xvf mod_limitipconn-0.24.tar.bz2
Go to that folder
Compile it with apache
Check the apache syntax and restart the apache service if it is Ok
Add the below lines in httpd.conf
# This command is always needed
# Only needed if the module is compiled as a DSO
LoadModule limitipconn_module lib/apache/mod_limitipconn.so
# Set a server-wide limit of 10 simultaneous downloads per IP,
# no matter what.
# This section affects all files under http://your.server/somewhere
# exempting images from the connection limit is often a good
# idea if your web page has lots of inline images, since these
# pages often generate a flurry of concurrent image requests
# This section affects all files under /home/*/public_html
# In this case, all MIME types other than audio/mpeg and video*
# are exempt from the limit check
OnlyIPLimit audio/mpeg video
Check the syntax if everything is ok then restart the apache.
Confirm that domains are working on the server. You can select the domain from the below file and try randomly accessing it.
This module will not function unless mod_status is loaded and the “ExtendedStatus On” directive is set.
Make sure mod security is already installed on the server using easyapache.