Neuigkeiten:

Join the Facebook Fan Page.

Hauptmenü
Advertisement:

Some info about IP bans requested

Begonnen von Ninja ZX-10RR, Juni 10, 2014, 07:15:35 NACHMITTAGS

Vorheriges Thema - Nächstes Thema

Ninja ZX-10RR

I have seen some topics in which Arantor (I'm sure you will read this as well so.. ;) ) was saying that IP bans can lead smf to work very much slower than normal and that's ok but my questions are 2, mainly:

  • How many bans can I use without slowing the system down? And does it depend also on how many users are online?
  • Can I ban an IP that has not yet created an account? I see a damn bot trying to register for days and I know it uses a static IP (91.236.75.85), I want it to get the *EHM* off my forum.

Thanks in advance as always  :)
Zitat von: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Arantor

Technically any ban in the system will slow it down. Far better not to use IP bans in SMF but do it at the webserver level if possible, e.g. in .htaccess files.

An IP ban in SMF or the webserver will prevent accesses even by non-registered users.
Holder of controversial views, all of which my own.


Ninja ZX-10RR

Thanks for your reply as always.

Hmm googling a bit I found some stuff about but as if this is a very important feature and I never used it I will ask twice to be really sure.

So if I just add this Order Deny,Allow
Deny from 91.236.75.85
Allow from all
will it work? But is there a dedicated place in which I should place that thing in .htaccess file?
Zitat von: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

a10

Use 91.236.75. to get more ip's used by that spammer. Or even 91.236. as most in that range are ua, ru, pl etc.

My current:

<Files 403.shtml>
order allow,deny
allow from all
</Files>
deny from 31.41.
deny from 37.58.100.
deny from 46.118.
deny from 46.119.
deny from 192.99.
2.0.19, php 8.0.30, MariaDB 10.6.18. Mods: Contact Page, Like Posts, Responsive Curve, Search Focus Dropdown, Add Join Date to Post.
Stand with 🇺🇦

Ninja ZX-10RR

What does that files 403 stuff mean? I really don't know how to set this file and googling didn't help much as people are posting very much complicated custom stuff I don't need. I only need to ban that IP and nothing else... Also that 37.58.100.etc was harrassing me as well.
Zitat von: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

a10

"the line <Files 403.shtml> indicates the page denied users are directed too. (403 - Forbidden)"

37.58.100. is one of the ahrefs pest bots. See http://blocklistpro.com/content-scrapers/ahrefsbot-seo-spybots.html

2.0.19, php 8.0.30, MariaDB 10.6.18. Mods: Contact Page, Like Posts, Responsive Curve, Search Focus Dropdown, Add Join Date to Post.
Stand with 🇺🇦

Ninja ZX-10RR

Thanks for the useful info :) hmm then I add like <Files 403.shtml>
order allow,deny
allow from all
</Files>
deny from 91.236.75.(85)
without the parenthesis and with or without the 85 to include more IP as I wish like you said. Now.. Where to place it in the file itself?
Zitat von: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

a10

Setup I posted above works fine here.

91.236.75.  = block 91.236.75.0-255
91.  = block everything starting with 91.

To test, use a proxy, example www.anonymouse.org, find it's ip and enter it in htaccess, and see if you get blocked (and get the 403 page) when trying to access your forum using the proxy.

Remember, any tiny error and nothing works anymore, so always check that the site acts normally after editing htaccess.
2.0.19, php 8.0.30, MariaDB 10.6.18. Mods: Contact Page, Like Posts, Responsive Curve, Search Focus Dropdown, Add Join Date to Post.
Stand with 🇺🇦

Ninja ZX-10RR

Well thank you man :D I'll set it up the way I said or even your way if all those IP ranges are spambots? Are they manual bans or all spam crap? If the last one I'll just copy-paste yours ;)
Zitat von: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Lou69

Here are a few links for you. They will help you to understand blocking by CIDR and looking up addresses. I usually block by CIDR ( range ) as that is usually a quick way to stop a block of spammers. You can also use it for countries.

http://jodies.de/ipcalc

http://www.ipaddresslocation.org/ipaddress.shtml

http://www.ip2location.com/demo.aspx

Ninja ZX-10RR

Thank you as well :D and thank you twice as I had forgotten to mark as solved ;)
Zitat von: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

a10

ZitatAre they manual bans or all spam crap?
37.58.100. is ahrefs, the others overactive spam. Used to put much more into htaccess, but got into trouble, the host somehow issuing false 403's, had to scale down.

About 192.99.  take a look at todays Top IP addresses on http://www.stopforumspam.com/
OVH is specializing in giving refuge to rats.

2.0.19, php 8.0.30, MariaDB 10.6.18. Mods: Contact Page, Like Posts, Responsive Curve, Search Focus Dropdown, Add Join Date to Post.
Stand with 🇺🇦

Ninja ZX-10RR

Roger that thank you very much I guess I'll do like you said, yeah I know that stopforumspam site ;) I have been tracking many of those from there :)
Zitat von: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Antechinus

Zitat von: Arantor in Juni 10, 2014, 07:18:02 NACHMITTAGS
Technically any ban in the system will slow it down. Far better not to use IP bans in SMF but do it at the webserver level if possible, e.g. in .htaccess files.

An IP ban in SMF or the webserver will prevent accesses even by non-registered users.

The other good thing about doing it in .htaccess (apart from performance) is that the banned suckers wont fill your admin error log up all the time either, because they never get as far as the forum. Makes a big difference when Baidu or some other idiots are trying to hammer you.

Ninja ZX-10RR

Never thought about it but yes because SMF forum doesn't get affected so.. Then 2 times better :D thank you as well then!
Zitat von: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Ninja ZX-10RR

Tried a10's code but doesn't work to me. Removed topic solved and asking one more time WHERE to put that damn code because I am like freaking out on this, also it's a VERY bad evening.
Zitat von: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Lou69

All I ever did was put the deny at the end of the .htaccess file.

deny from 91.236.75/24
deny from xxx.xx.xx.xx

In the above fashion.

Or like this .....

#######################################################################################
#Block bad IP
#######################################################################################
order allow,deny
deny from  24.91.97.152 114.130.28.154 91.207.7.182 91.207.4.14
allow from all

Either should work for you.

Ninja ZX-10RR

Thanks for your reply, I tried to put this exact code in there at the end:

#Block bad IP
#######################################################################################
order allow,deny
deny from  24.91.97.152 114.130.28.154 91.207.7.182 91.207.4.14 37.58.100. 46.118. 46.119 192.99. 31.41.
allow from all


I'll let you know if this works ;)
Zitat von: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Kindred

Hmmmm...I always use a single ip deny per line myself
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

Doesn't make any appreciable difference AFAIK.
Holder of controversial views, all of which my own.


Kindred

Probably not, in terms of action... But in terms of being able to quickly scan the list of bans, one per line is easier to parse in my head
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Ninja ZX-10RR

Thanks for your replies as always :)

Yeah I know it *shouldn't* make any difference but I was really freaking out because it wasn't working the other way so I totally copied and pasted it, I guess I will parse it in a better way for sure but after I checked that it works.
Zitat von: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Ninja ZX-10RR

I mark this as solved again as I haven't seen anymore of those spambots attempting to register, I'll bump if I notice any other issue with this ;) thank to everybody for your kind assistance :D
Zitat von: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Ninja ZX-10RR

Did NOT work. Guys I am beginning to get desperate atm!!! Where the heck am I wrong? An IP that was in a banned range just connected so it didn't work completely. I banned 37.58.100 but 37.58.100.149 managed to connect! Can I post the whole ht access file or I risk something in security?

*marks it as not solved, again  :'( *
Zitat von: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

br360

How are you banning by range? In .htaccess I think it should be something like 37.58.100/255

Take a look at this site as it will help generate htaccess code- http://www.toshop.com/htaccess-generator.cfm

Ninja ZX-10RR

Zitat von: a10 in Juni 10, 2014, 08:54:02 NACHMITTAGS
Setup I posted above works fine here.

91.236.75.  = block 91.236.75.0-255
91.  = block everything starting with 91.

To test, use a proxy, example www.anonymouse.org, find it's ip and enter it in htaccess, and see if you get blocked (and get the 403 page) when trying to access your forum using the proxy.

Remember, any tiny error and nothing works anymore, so always check that the site acts normally after editing htaccess.
He said that.
Zitat von: a10 in Juni 10, 2014, 08:54:02 NACHMITTAGS
91.236.75.  = block 91.236.75.0-255
91.  = block everything starting with 91.
Zitat von: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

a10

ZitatI banned 37.58.100 but 37.58.100.149
was that 37.58.100 or 37.58.100. (forgetting the last . )? And is the htaccess placed in root.

A (very effective) way to test that htaccess is working and recognized, try introducing an error, example:   defy from 37.58.100.
This will produce a 500 Internal Server Error (of course, fix it immeditely after the test).

Just added 91.213.93. here (some witless bot from Kazakhstan using the 91.213.93.* range, hammering my site with 1000's hits an hour), stopped instantly.
2.0.19, php 8.0.30, MariaDB 10.6.18. Mods: Contact Page, Like Posts, Responsive Curve, Search Focus Dropdown, Add Join Date to Post.
Stand with 🇺🇦

Lou69

OK ... just how are you see that this banned IP has connected? What log?

Now, I have never banned an IP by simply doing 123.123.123. , I have always done a 123.123.123/24 or what ever value I wanted for a CIDR ban. Maybe not adding the /24 will work but I have not seen it done before.

As mentioned before, where are you putting the .htaccess file? It must reside in the webspace, in other words the SMF directory.

Take a look at this script, it works great at blocking and protecting a site. It will create an .htaccess file for you and you can then enter the banned IPs.

http://www.crawltrack.net/crawlprotect/download.php

a10

deny from 123. = electrocute 123.*.*.*
deny from 123.123. = liquidate 123.123.*.*
deny from 123.123.123. = guillotine 123.123.123.*
deny from 123.123.123.123 = lynch 123.123.123.123

See 'Banning An IP Address' > http://blamcast.net/articles/block-bots-hotlinking-ban-ip-htaccess
2.0.19, php 8.0.30, MariaDB 10.6.18. Mods: Contact Page, Like Posts, Responsive Curve, Search Focus Dropdown, Add Join Date to Post.
Stand with 🇺🇦

Lou69

Hmmm .... apparently I have been liquidating and guillotining quite a bit.   ;D

Thanks for the link.

a10

was just expressing my deeper feelings about bots and spammers  :D
2.0.19, php 8.0.30, MariaDB 10.6.18. Mods: Contact Page, Like Posts, Responsive Curve, Search Focus Dropdown, Add Join Date to Post.
Stand with 🇺🇦

Ninja ZX-10RR

I tried hard and it seems to me that my ht access is set up like that but didn't work the last time... I don't know why it didn't work last time but I tried the defy thing and hell it works like a charm I tried a "supposed to be banned" IP address and it gave me error 500 so yeah it worked I believe.

Thanks for your replies, once more I will mark this as solved, hopefully forever xD but I will test it much more if I have further problems I will bump again :P
Zitat von: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Ninja ZX-10RR

*yelling at the monitor*

Didn't work, AGAIN. I have a guest from 37.58.100.68 and I have banned the "37.58.100." so it didn't work. WTF?

This is my bloody htaccess file

##
# @version $Id: htaccess.txt 21101 2011-04-07 15:47:33Z dextercowley $
# @package Joomla
# @copyright Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.
# @license GNU General Public License version 2 or later; see LICENSE.txt
##

##
# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!
#
# The line just below this section: 'Options +FollowSymLinks' may cause problems
# with some server configurations.  It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file.  If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url's.  If they work,
# it has been set by your server administrator and you do not need it set here.
##

## Can be commented out if causes errors, see notes above.
Options +FollowSymLinks

## Mod_rewrite in use.

RewriteEngine On

## Begin - Rewrite rules to block out some common exploits.
# If you experience problems on your site block out the operations listed below
# This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block out any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root homepage
RewriteRule .* index.php [F]
#
#Set the timezone
SetEnv TZ Europe/Rome
## End - Rewrite rules to block out some common exploits.

## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
## End - Custom redirects

##
# Uncomment following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root).
##

# /* modifica */
RewriteBase /
# /* fine */

## Begin - Joomla! core SEF Section.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the request is for something within the component folder,
# or for the site root, or for an extensionless URL, or the
# requested URL ends with one of the listed extensions
RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$ [NC]
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
## End - Joomla! core SEF Section.

# /* modifica */
# # av:php5-engine
AddHandler av-php5 .php
# /* fine */

#Block bad IP
#######################################################################################
order allow,deny
deny from  24.91.97.152 114.130.28.154 91.207.7.182 91.207.4.14 37.58.100. 46.118. 46.119. 192.99. 31.41. 5.255.253.164 213.87.123.232 37.58.100.149 184.173.183.170 184.173.183.171
allow from all

Zitat von: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Shambles

^-- have you tried entering each IP on a separate line in the file?


deny from ip1
deny from ip2
--

Ninja ZX-10RR

I have tried that before but 2 things..
1) it wasn't working anyway
2)Arantor said that it should be the same...

Well im gonna try that AGAIN then >.< thanks for your suggestion..
Zitat von: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Ninja ZX-10RR

Tried again and it works but half. It works if I manually ban EACH IP but it doesn't work if I try to ban an IP range such as 37.58.100. (and all the relative ones, so I had to ban them one by one) how to fix this? Thanks in advance for all your replies ;)
Zitat von: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Shambles

Banning subdomains under an IP block should work just fine - I'm surprised it isn't working for you.

However, try a subdomain block using CIDR

Eg,


deny from 37.58.100.0/24
deny from 46.118.0.0/16
deny from 46.119.0,0/16
deny from 192.99.0.0/16
deny from 31.41.0.0/16

Ninja ZX-10RR

Don't IP addresses end with 255 as highest number? Why 24 or 16 then? Sorry if I don't know this :(
Zitat von: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Shambles


Ninja ZX-10RR

Indeed sorry about that I had not very much time to reply and couldn't google the whole explanation. However it "SEEMS" to work, once more, again, hopefully *again* last time.

I tried defy with a banned IP and it was giving me a 500 error so it SEEMS that it worked... It's now like this.

##
# @version $Id: htaccess.txt 21101 2011-04-07 15:47:33Z dextercowley $
# @package Joomla
# @copyright Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.
# @license GNU General Public License version 2 or later; see LICENSE.txt
##

##
# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!
#
# The line just below this section: 'Options +FollowSymLinks' may cause problems
# with some server configurations.  It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file.  If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url's.  If they work,
# it has been set by your server administrator and you do not need it set here.
##

## Can be commented out if causes errors, see notes above.
Options +FollowSymLinks

## Mod_rewrite in use.

RewriteEngine On

## Begin - Rewrite rules to block out some common exploits.
# If you experience problems on your site block out the operations listed below
# This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block out any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root homepage
RewriteRule .* index.php [F]
#
#Set the timezone
SetEnv TZ Europe/Rome
## End - Rewrite rules to block out some common exploits.

## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
## End - Custom redirects

##
# Uncomment following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root).
##

# /* modifica */
RewriteBase /
# /* fine */

## Begin - Joomla! core SEF Section.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the request is for something within the component folder,
# or for the site root, or for an extensionless URL, or the
# requested URL ends with one of the listed extensions
RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$ [NC]
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
## End - Joomla! core SEF Section.

# /* modifica */
# # av:php5-engine
AddHandler av-php5 .php
# /* fine */

#Block bad IP
#######################################################################################
order allow,deny
deny from  24.91.97.152
deny from  114.130.28.154
deny from  91.207.7.182
deny from  91.207.4.14
deny from  37.58.100.0/16
deny from  46.118. 46.119
deny from  192.99. 31.41
deny from  5.255.253.164
deny from  213.87.123.232
deny from  184.173.183.0/16
allow from all

Zitat von: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Shambles

Good.

Be aware that 37.58.100.0/16 will actually prohibit the range 37.58.*.* and not just 37.58.100.*

Ditto 184.173.183.0/16 will apply the prohibition to 184.173.*.*

Ninja ZX-10RR

Not good then, how could I ban only the 37.58.100.*.* range with that method?  :'(
Zitat von: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Shambles


Ninja ZX-10RR

As attached
47879 polygons in 3D
Total time: around 3 minutes (most of them for managing the screenshot ;) )
Zitat von: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Shambles


Arantor

Holder of controversial views, all of which my own.


Ninja ZX-10RR

Yeah indeed they are pretty heavy xD the weapons I make are faraway lower in polys, it's kinda funny  :laugh:

Oh by the way I'll mark this as solved once more xD (I think it's the 3rd time or something like that lol)
Zitat von: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Ninja ZX-10RR

I swear to god i am not trolling but this IP 37.58.100.167 managed to connect and it shouldn't have been possible as I have set deny from 37.58.100.0/24, so didn't really work even as it seemed to... It sounds damn crazy as if I try to defy from that IP it fails to connect but I did have this IP connected D: I attached a screenshot so you see that I'm not trolling you because it would seem so but really isn't  :'( :-X

*marks again as not solved and tries to kill his ht access file making it suffering painfully*

My htaccess again:
##
# @version $Id: htaccess.txt 21101 2011-04-07 15:47:33Z dextercowley $
# @package Joomla
# @copyright Copyright (C) 2005 - 2011 Open Source Matters. All rights reserved.
# @license GNU General Public License version 2 or later; see LICENSE.txt
##

##
# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!
#
# The line just below this section: 'Options +FollowSymLinks' may cause problems
# with some server configurations.  It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file.  If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url's.  If they work,
# it has been set by your server administrator and you do not need it set here.
##

## Can be commented out if causes errors, see notes above.
Options +FollowSymLinks

## Mod_rewrite in use.

RewriteEngine On

## Begin - Rewrite rules to block out some common exploits.
# If you experience problems on your site block out the operations listed below
# This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block out any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root homepage
RewriteRule .* index.php [F]
#
#Set the timezone
SetEnv TZ Europe/Rome
## End - Rewrite rules to block out some common exploits.

## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
## End - Custom redirects

##
# Uncomment following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root).
##

# /* modifica */
RewriteBase /
# /* fine */

## Begin - Joomla! core SEF Section.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the request is for something within the component folder,
# or for the site root, or for an extensionless URL, or the
# requested URL ends with one of the listed extensions
RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$ [NC]
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
## End - Joomla! core SEF Section.

# /* modifica */
# # av:php5-engine
AddHandler av-php5 .php
# /* fine */

#Block bad IP
#######################################################################################
order allow,deny
deny from  24.91.97.152
deny from  114.130.28.154
deny from  91.207.7.182
deny from  91.207.4.14
deny from  37.58.100.0/24
deny from  46.118. 46.119
deny from  192.99. 31.41
deny from  5.255.253.164
deny from  213.87.123.232
deny from  184.173.183.0/24
allow from all
Zitat von: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Ninja ZX-10RR

Marking as solved again, and this is the last time, for reference --> http://www.simplemachines.org/community/index.php?topic=523925.0 many thanks to Lou69, Arantor, CoreISP, Shambles, Antechinus, Kindred and a10. :D

Useful links regarding the question:
http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order
http://httpd.apache.org/docs/current/mod/mod_access_compat.html#allow
Zitat von: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

a10

Just a note about deny's, took htaccess away for a day (14.06) to check the bot activity, see attachment.
2.0.19, php 8.0.30, MariaDB 10.6.18. Mods: Contact Page, Like Posts, Responsive Curve, Search Focus Dropdown, Add Join Date to Post.
Stand with 🇺🇦

gogotha

Thanks Flavio93Zena for bringing this up. I am starting to ban countries that are hammering our forum. Cant really tell what they are doing since our site is private but they are landing on the registration page by the hundreds.

SMF, is running IP bans in SMF on a dedicated power edge 1750, 2.4ghz, 2 Dual xeon cpu's, 4gig ram with 1 forum and 1 ftp cause a slow down?

I am running IIS, putting the banned CIDR in ->IIS ->SMF Website ->Directory Security ->IP address and Domain name restrictions suffice?
This world is our Host, we are the virus... consume or be consumed.

Kindred

yes. Using the SMF ban system in that way will indeed have performance consequences
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Ninja ZX-10RR

No problem I suggest you to read this guide it explains everything in details ;)

Still no one has moved it to tips and tricks but it's still good --> http://www.simplemachines.org/community/index.php?topic=524146.0
Zitat von: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

gogotha

Well pooh, I am running SMF on M$ Server. Since .htaccess is Apache, I will see how M$ IIS "IP address and Domain name restrictions" in Directory Security works and remove IP bans from SMF Forum. I have apache on Server but I am running experimental SugarCRM on it.

I thought about putting CDIR block in my smoothwall but damn-it, linux not strong suite, need GUI!  :-[

Thanks for replies!
This world is our Host, we are the virus... consume or be consumed.

Ninja ZX-10RR

Well you're welcome I hope you can sort it out somehow. I know that htaccess stuff but I can't tell you how to find a workaround for that... Maybe posting a topic in here (http://www.simplemachines.org/community/index.php?board=60.0) would be more helpful ;)
Zitat von: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Advertisement: