Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

{IIS} Protect Against DoS (Slow Loris) Attacks

Newbie Spellweaver
Joined
Jun 30, 2019
Messages
7
Reaction score
3
Hellos RZ,

First things first, I am not an expert at these things and this is not a "this will 100% guarantee to block all DoS attacks" this is just a few things I use to protect my IIS install from them. There are probably much better ways of doing this, and I probably have things that are messed up.. if you know of a better way than please let me know.

This tutorial also presumes you already have IIS installed and configured for your retro.

First thing you want to do is go into your IIS manager, go to your site, and go into Request Filtering.

Hit "Edit Feature Settings" on the right hand side, see screenshot below for my settings.

69Jf1HW - {IIS} Protect Against DoS (Slow Loris) Attacks - RaGEZONE Forums


Click ok then go to the headers tab in request filtering, and add a new header with these entries

nwun2H - {IIS} Protect Against DoS (Slow Loris) Attacks - RaGEZONE Forums


Then, go back to your website settings and right click and select "advanced settings" shown below. Then expand the limits tab and set connection timeout to 30. Once done click ok.

ZGn3k6C - {IIS} Protect Against DoS (Slow Loris) Attacks - RaGEZONE Forums


Next go up to "Application Pools" and right click the one that shares the name with the website name you have setup. For me, this is default, and select advanced settings. Scroll down until you see "generate process model...." and set "Idle Time-Out (Minutes)" to "1" and "maximum Worker Processes" to 0 as shown

Ofykj44 - {IIS} Protect Against DoS (Slow Loris) Attacks - RaGEZONE Forums




That should be it! hopefully I havn't missed anything!
 

Attachments

You must be registered for see attachments list
Rogu3
Joined
May 11, 2012
Messages
933
Reaction score
508
Hellos RZ,

First things first, I am not an expert at these things and this is not a "this will 100% guarantee to block all DoS attacks" this is just a few things I use to protect my IIS install from them. There are probably much better ways of doing this, and I probably have things that are messed up.. if you know of a better way than please let me know.

This tutorial also presumes you already have IIS installed and configured for your retro.

First thing you want to do is go into your IIS manager, go to your site, and go into Request Filtering.

Hit "Edit Feature Settings" on the right hand side, see screenshot below for my settings.

69Jf1HW - {IIS} Protect Against DoS (Slow Loris) Attacks - RaGEZONE Forums


Click ok then go to the headers tab in request filtering, and add a new header with these entries

nwun2H - {IIS} Protect Against DoS (Slow Loris) Attacks - RaGEZONE Forums


Then, go back to your website settings and right click and select "advanced settings" shown below. Then expand the limits tab and set connection timeout to 30. Once done click ok.

ZGn3k6C - {IIS} Protect Against DoS (Slow Loris) Attacks - RaGEZONE Forums


Next go up to "Application Pools" and right click the one that shares the name with the website name you have setup. For me, this is default, and select advanced settings. Scroll down until you see "generate process model...." and set "Idle Time-Out (Minutes)" to "1" and "maximum Worker Processes" to 0 as shown

Ofykj44 - {IIS} Protect Against DoS (Slow Loris) Attacks - RaGEZONE Forums




That should be it! hopefully I havn't missed anything!

To be clear, this isn't necessarily DDoS protection, but you're right it can help protect your server. You're essentially limiting the size of requests and setting a timeout on them so they don't queue up.

A better solution is full on mitigation to another server, and there are actually a lot of hosting companies that provide the service. You can also set it up yourself on AWS, if you know how.

Thanks for sharing.
 

Attachments

You must be registered for see attachments list
Shh, quiet, you might piss somebody off
Developer
Joined
Dec 23, 2011
Messages
1,797
Reaction score
2,162
To be clear, this isn't necessarily DDoS protection, but you're right it can help protect your server. You're essentially limiting the size of requests and setting a timeout on them so they don't queue up.

A better solution is full on mitigation to another server, and there are actually a lot of hosting companies that provide the service. You can also set it up yourself on AWS, if you know how.

Thanks for sharing.

slow loris is a software based attack(layer 7), not a spam or brute force
 
Newbie Spellweaver
Joined
Jun 30, 2019
Messages
7
Reaction score
3
Most datacenter these days do mitigation which is nice so solong as your server is hosted by a datacenter that has it the only real threat then is slowloris attacks...and probably many many other things my tired brain can't think of...but hey atleast we somewhat have a way of holding against them!
 
Newbie Spellweaver
Joined
Mar 5, 2019
Messages
14
Reaction score
3
if money isn't an issue, CloudFlare's business plan will block all types of OWASP attacks.
 
Joined
Feb 22, 2012
Messages
2,100
Reaction score
1,271
This helps in case of Slowloris attacks. Cloudflare doesn't for some reason.

The problem is that you can send very slow header requests, and Microsoft's own documentation says something that won't work on IIS 7.5+ for header timeout.

The best way is to create a load balancing with HAProxy then limit Header/Body timeout.

Header is usually pretty small, so I'd say the timeout should be 5 seconds.

Edit: by the way, 30.000.000 max content length a bit too high?

It would probably be ineffective against slowloris.

It means that you can send 1 byte every 29 seconds, up until 30.000.000 bytes, and still be connected.
 
Last edited:
Back
Top