Hi
I regularly get massive request for some random file from a single IP, for example 17845 times for one file in one day. This causes my server to activate a bandwidth limiter and my download counter is messed up.
Is there any kind of flood control possible to prevent this?
Thanks!
Lorenz
Flood protection?
- Jan
- Phoca Hero
- Posts: 48550
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Flood protection?
Hi, just use some protection tool for your server and e.g. ban this IP to access your server completely 
Jan

Jan
If you find Phoca extensions useful, please support the project
- ep98
- Phoca Professional
- Posts: 163
- Joined: 12 May 2008, 12:00
- Contact:
Re: Flood protection?
Try with .htaccess in your root of the site, eg: /public_html - this is a hotlink protection, aka Your server as cloud and files to be linked directly to another page or with any other words, someone is using your hard work for free
Example, Jan is hot-linking files from GIT (but that's what for is made GitHub)
Those code will not prevent anyone from downloading those files, they just have to be downloaded only trough your site, any external linking will lead to 403 or nasty picture.
3rd line - change example.com to your domain
4th line - describe which files should not be touched from outside the domain
in addition to this code block you can add and another line
where gif|jpg are the requested files, and example.com leads to the site with some nasty picture 
This should be added to prevent user to type domain.com/some-directory without empty index.html to see what's inside. 2nd line tells the application, to load symlinks - eg. on some hosting providers have symlink www pointing -> public_html
the above lines are to ban specific IP address
@Ian - why the hell this stupid phpBB3 does not recognize BBCodes for displaying code and/or image ?
https://postimg.org/image/tja09nhxb/
That's usually how it looks with working code tag

Those code will not prevent anyone from downloading those files, they just have to be downloaded only trough your site, any external linking will lead to 403 or nasty picture.
Code: Select all
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)example.com/.*$ [NC]
RewriteRule \.(gif|jpg|jpeg|bmp|zip|rar|mp3|flv|swf|xml|php|png|css|pdf)$ - [F]
4th line - describe which files should not be touched from outside the domain
in addition to this code block you can add and another line
Code: Select all
RewriteRule \.(gif|jpg)$ http://www.example.com/take-this-big-dick.gif [R,L]

Code: Select all
Options -Indexes
Options +FollowSymLinks
Code: Select all
<Limit GET POST>
order allow,deny
deny from xxx.xxx.xx.x
allow from all
</Limit>
@Ian - why the hell this stupid phpBB3 does not recognize BBCodes for displaying code and/or image ?
https://postimg.org/image/tja09nhxb/
That's usually how it looks with working code tag
May The Source Be With You !
- Jan
- Phoca Hero
- Posts: 48550
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Flood protection?
Hi, thank you for the quide.
When you answer the post here, check if Disable BBCode is not enabled

Jan
When you answer the post here, check if Disable BBCode is not enabled

Jan
If you find Phoca extensions useful, please support the project
- ep98
- Phoca Professional
- Posts: 163
- Joined: 12 May 2008, 12:00
- Contact:
- Jan
- Phoca Hero
- Posts: 48550
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact: