sixem / ivfi-php

IVFi is a directory indexer that aims to make it easy to browse and explore web-accessible directories.
https://git.five.sh/ivfi/
Other
108 stars 18 forks source link

How can it handle a ddos attack? #23

Closed IAmBlackat closed 2 years ago

IAmBlackat commented 2 years ago

Hi, Is there a way indexer to handle the ddos attack or lets say if someone is doing ddos via clicking on the file (e.g. .exe file) so if someone click on it, the bandwidth will go high and crash the server?

If so, how to save yourself in this case?

Thanks

sixem commented 2 years ago

Hello.

The Indexer does not serve the files at all, that's the job of whatever web server you are using. All the Indexer does is read directories, display information, links to the files and so on. Once you view an image, video or click on a file, the request is handled by the web server, not the script.

To protect yourself against DDOS attacks, you'll have to set up your web server (and possibly your actual server too) to handle that.

Hopefully that clears it up.

IAmBlackat commented 2 years ago

Yes, it does make sense now. Regarding the .exe, .txt, .xlsx file, what do you think I can do to make it ddos-proof to use it with indexer?

sixem commented 2 years ago

Yes, it does make sense now. Regarding the .exe, .txt, .xlsx file, what do you think I can do to make it ddos-proof to use it with indexer?

If you want to mitigate DDOS attacks, using something like Cloudflare is probably the easiest solution.

If you are using Nginx as your web server, you can use its rate limiting feature (see: https://www.nginx.com/blog/rate-limiting-nginx/). You can also limit the maximum download speed per connection using that method, if bandwidth usage is a worry. I'm sure something similar can be done with Apache too, but I don't use it myself.

sixem commented 2 years ago

I'll go ahead and close this one right now, seeing as I think you got the answer you were looking for. If you still have any questions, then don't hesitate to message me!