Page Index Toggle Pages: [1] 2 
Topic Tools
Hot Topic (More than 10 Replies) Blocking IP Address via .htaccess (Read 3,384 times)
Jkulin
Junior Member
**
Offline



Posts: 59
Location: Staffs. UK
Blocking IP Address via .htaccess
Aug 19th, 2010 at 12:01pm
Post Tools
I need to block some users from visiting the forum altogether.

I tried editing the .htaccess file under/cgi-bin/yabb2 by add the following lines: -

# Last modified by The Guardian: 10<sup>th</sup> Aug, 2010 at 11:08pm #
# allow all except those indicated here
<Directory /cgi-bin/yabb2>
order allow,deny
allow from all
deny from 86.112.172.18
deny from 217.33.200.46
deny from 195.93.21.34
deny from 195.93.21.6
deny from 195.93.21.33
deny from 195.93.21.67
deny from 195.93.21.69
deny from 195.93.21.5
deny from 217.33.200.46
deny from 78.144.91.146
deny from 149.254.56.9
deny from 195.93.21.72
</Files>

Have I missed something out as it comes up with an apache server error, sorry if I am being a pain!
  
Back to top
 
IP Logged
 
Captain John
Ex Member


Re: Blocking IP Address via .htaccess
Reply #1 - Aug 19th, 2010 at 2:29pm
Post Tools
The htaccess file in the yabb2 folder should look like this:
Code
Select All
# Last modified by The Guardian: Aug 19<sup>th</sup>, 2010 at 10:24am #


<Files YaBB*>
Deny from 195.2
Deny from 222.190
Deny from 124.217
Deny from 92.241
Deny from 194.110
Deny from 203.62
Deny from 203.70
Deny from 203.76
Deny from 203.162
</Files> 



    Adding/deleting IPs should be done from the Admin Center - The Guardian - Global and Server Settings window
  
Back to top
 
IP Logged
 
Jkulin
Junior Member
**
Offline



Posts: 59
Location: Staffs. UK
Re: Blocking IP Address via .htaccess
Reply #2 - Aug 19th, 2010 at 2:51pm
Post Tools
Brilliant Capt. you make things look so easy and once you showed me they are, this Board software is just so cool, thanks Cool
  
Back to top
 
IP Logged
 
Captain John
Ex Member


Re: Blocking IP Address via .htaccess
Reply #3 - Aug 19th, 2010 at 3:20pm
Post Tools
Welcome ......
  
Back to top
 
IP Logged
 
Jkulin
Junior Member
**
Offline



Posts: 59
Location: Staffs. UK
Re: Blocking IP Address via .htaccess
Reply #4 - Sep 1st, 2010 at 4:35pm
Post Tools
Captain, is there any way to block countries, all the attacks seem to be from Russia, Israel and obscure countries.

Or is it a matter that "The Guardian" is secure enough to withstand any such attack.

It seems to be that they try to register with obscure user names and when I check the IP address's they all seem to come from those countries?

Essentially the forum is set up for UK based people

Many Thanks.
  
Back to top
 
IP Logged
 
Captain John
Ex Member


Re: Blocking IP Address via .htaccess
Reply #5 - Sep 1st, 2010 at 7:40pm
Post Tools
Absolutely ... see http://www.blockacountry.com/

  Note:  The Guardian accepts wildcards ... this is NOT ? or * ... it means abbreviating an IP   example entering 221.21 will block ALL IPS starting with
  
Back to top
 
IP Logged
 
Jkulin
Junior Member
**
Offline



Posts: 59
Location: Staffs. UK
Re: Blocking IP Address via .htaccess
Reply #6 - Sep 2nd, 2010 at 12:08am
Post Tools
Thanks once again Captain Cool
  
Back to top
 
IP Logged
 
Captain John
Ex Member


Re: Blocking IP Address via .htaccess
Reply #7 - Sep 2nd, 2010 at 2:59am
Post Tools
Welcome .....
  
Back to top
 
IP Logged
 
Jkulin
Junior Member
**
Offline



Posts: 59
Location: Staffs. UK
Re: Blocking IP Address via .htaccess
Reply #8 - Sep 3rd, 2010 at 8:46am
Post Tools
Morning Captain,

On my other forum the .htaccess file is not being updated from the guardian, there was only one line in it, any thoughts?

As a temporary measure I edited it and inserted the fields, but would rather hope that it did it automatically from the admin panel. Everything that needs to be checked is within the settings and permissions are good as well.
  
Back to top
 
IP Logged
 
Captain John
Ex Member


Re: Blocking IP Address via .htaccess
Reply #9 - Sep 3rd, 2010 at 2:35pm
Post Tools
Jkulin wrote on Sep 3rd, 2010 at 8:46am:
but would rather hope that it did it automatically from the admin panel.

  Automatically ???  "ONLY for Auto add abusing IP addresses to .htaccess?" concerning Proxy, Referer, Harvester, Request. Scripting and Environment blocking "IF" enabled AND an attempt is made.
« Last Edit: Sep 3rd, 2010 at 2:37pm by »  
Back to top
 
IP Logged
 
Jkulin
Junior Member
**
Offline



Posts: 59
Location: Staffs. UK
Re: Blocking IP Address via .htaccess
Reply #10 - Sep 3rd, 2010 at 2:49pm
Post Tools
Quote:
Jkulin wrote on Sep 3rd, 2010 at 8:46am:
but would rather hope that it did it automatically from the admin panel.

  Automatically ???  "ONLY for Auto add abusing IP addresses to .htaccess?" concerning Proxy, Referer, Harvester, Request. Scripting and Environment blocking "IF" enabled AND an attempt is made.



Sorry Captain I probably didn't explain myself.

I have added a host of IP address's that I wish to block under Global & Server settings, I believe from your previous advice that this is the correct way to block an IP address rather than edit the .htaccess file manually, is this correct?

If so then when I add the IP address to this section, it isn't putting it into the .htaccess file?

Hope that explains a little better the problem?

BTW I have checked the auto add function
« Last Edit: Sep 3rd, 2010 at 2:50pm by Jkulin »  
Back to top
 
IP Logged
 
Captain John
Ex Member


Re: Blocking IP Address via .htaccess
Reply #11 - Sep 3rd, 2010 at 3:11pm
Post Tools
Jkulin wrote on Sep 3rd, 2010 at 2:49pm:
If so then when I add the IP address to this section, it isn't putting it into the .htaccess file?

  mmmmm It works for me ... on a Y2.2.3 and Y2.5 forum.  Are you checking the correct htaccess file (there are several).  The Guardian places it in the yabb2 or root folder (where your YaBB.pl is located)

both checked ?
Use The Guardian™ to protect your board?

Activate .htaccess to add IP blocks on server level?
(Only works if your server supports /.htaccess files.)
« Last Edit: Sep 3rd, 2010 at 3:20pm by »  
Back to top
 
IP Logged
 
Jkulin
Junior Member
**
Offline



Posts: 59
Location: Staffs. UK
Re: Blocking IP Address via .htaccess
Reply #12 - Sep 3rd, 2010 at 3:27pm
Post Tools
All checked, its working fine on my other forum hosted by Webfusion as well, just not working on this one with an identical setup Huh
  
Back to top
 
IP Logged
 
Captain John
Ex Member


Re: Blocking IP Address via .htaccess
Reply #13 - Sep 3rd, 2010 at 9:03pm
Post Tools
You are aware it is a hidden file.  Only see if hidden files are permitted to be viewed.
  
Back to top
 
IP Logged
 
Jkulin
Junior Member
**
Offline



Posts: 59
Location: Staffs. UK
Re: Blocking IP Address via .htaccess
Reply #14 - Sep 3rd, 2010 at 9:25pm
Post Tools
Yep Captain, I can't view it in cuteftp, but I can view it in the file manager program of Web Fusion.
« Last Edit: Sep 3rd, 2010 at 9:25pm by Jkulin »  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Topic Tools