Search code examples
phpcurldenial-of-service

PHP: Opening URLs concurrently to simulate a DOS attack?


I have configured my server with various anti-DOS modules (mod_qos, mod_evasive etc). What I want to do now is run a simple PHP scrip that calls URLs on my site multiple times, in order to reach the various limits on the site. Ideally a script that can somehow open various URLs concurrently would be ideal.

Is this possible? And if not, what is the easiest way to simulate multiple requests from one IP?

I would prefer a tool that works in Windows 7?

Update: Remember, i want to be able to see if my server is actually blocking some of the requests. I've only played with AB for a little bit, but so far it hasn't shown me that requests were blocked?


Solution

  • This was very useful under Windows: OpenLoad

    I executed it using:

    openload.exe http://www.mysite.com 250
    

    And then I could easily see the result in my Apache Error Log:

    tail -f /usr/local/apache/logs/error_log
    

    I could see:

    [Mon Apr 08 12:09:05 2013] [error] mod_qos(031): access denied, QS_SrvMaxConnPerIP rule: max=50, concurrent connections=59, c=XX.XXX.XX.XXX
    [Mon Apr 08 12:09:05 2013] [error] mod_qos(031): access denied, QS_SrvMaxConnPerIP rule: max=50, concurrent connections=60, c=XX.XXX.XX.XXX
    etc