Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 02-28-2004, 08:53 PM   #1
BrentD
ZothNET.com
 
BrentD's Avatar
 
Industry Role:
Join Date: May 2003
Location: Central PA
Posts: 1,422
htaccess to ban ips

Does anyone have the proper code for banning ips from your website using htaccess, which gives them a 403 page? I want to ban full ips and ip blocks both, anyone know this htaccess code? Also need code that will block all folders and pages, kinda like a /home/username/www/* any folders and folders below in the web root from that ip seeing any of the website.

Thanks for your help in advance.


BrentD
__________________
WordPress Specialist
Xenforo/IPS/VB Specialist
https://www.zothnet.com
BrentD is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-28-2004, 08:58 PM   #2
Intrigue
Confirmed User
 
Join Date: Feb 2004
Location: Ohio, US
Posts: 662
mod_rewrite
good luck, it's pretty tricky to get the hang of, if you know perl regex's you should be good, otherwise you might be boned. However, mod_rewrite is the way to go.
Intrigue is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-28-2004, 09:11 PM   #3
AlienQ - BANNED FOR LIFE
best designer on GFY
 
AlienQ - BANNED FOR LIFE's Avatar
 
Join Date: Mar 2003
Location: IALIEN.COM - High Definition Video and Photographic Productions -ICQ 78943384
Posts: 30,307
Make sure the ban IP list is reliable to if ya get one from another party
AlienQ - BANNED FOR LIFE is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-28-2004, 09:16 PM   #4
BrentD
ZothNET.com
 
BrentD's Avatar
 
Industry Role:
Join Date: May 2003
Location: Central PA
Posts: 1,422

Well I am trying to use this on a windows server running asp as the website but its not working:


<Limit GET>
order allow,deny
deny from 195.47.23.26
allow from all
ErrorDocument 404 /banned.html
</Limit>


Any suggestions?
__________________
WordPress Specialist
Xenforo/IPS/VB Specialist
https://www.zothnet.com
BrentD is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-29-2004, 11:37 AM   #5
Intrigue
Confirmed User
 
Join Date: Feb 2004
Location: Ohio, US
Posts: 662
Not sure if iis even supports .htaccess ( i don't think it does) you could put it in the Session_onStart event, or load it from a file on the application's onStart event. if you can't find anything, hit me up and i can come up with something for you for a nice, reasonable price.
Intrigue is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-29-2004, 11:41 AM   #6
tartane
Registered User
 
Join Date: Feb 2004
Location: France
Posts: 12
.htaccess and .htpassword only work on Apache Serveur/UNIX
__________________
SIG TOO BIG! Maximum 120x60 button and no more than 3 text lines of DEFAULT SIZE and COLOR. Unless your sig is for a GFY top banner sponsor, then you may use a 624x80 instead of a 120x60.
tartane is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-29-2004, 11:42 AM   #7
rounders
Confirmed User
 
Join Date: Sep 2003
Location: p0rn0stars & h0es
Posts: 2,931
is there a way to use htaccess to your advantage when you got 400 lines of code in it? =/

all the rewrite code hogs up all the memory - anyway to go around that?
__________________
ICQ#: 153923840
rounders is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-29-2004, 12:28 PM   #8
tartane
Registered User
 
Join Date: Feb 2004
Location: France
Posts: 12
Before enabling .htaccess files, consider the advantages and disadvanteges. On servers I run myself, with no users, I tend to use .htaccess files for testing and debugging, and when I have a configuration I like, I move the directives into a <Directory> container in the httpd.conf file and delete the .htaccess file. For this reason, I have overrides enabled just about everywhere. This allows me to balance the convenience of .htaccess files against their performance impact.

On some of my servers I have some user accounts for people I know and trust, and in those environments I'm more cautious and don't allow all overrides globally. I do tend to allow whatever overrides my friends need for their own directories, though.

And in some cases I have real 'user' accounts, for people I do not know as well -- and on those servers AllowOverride None is the rule. I occasionally allow .htaccess files in their private directories, but I carefully audit the possible effects before granting an override category.

The two main disadvantages to using .htaccess are the performance impact and the extending of control access to others. The first is somewhat manageable through the judicious use of the AllowOverride directive, and the latter is a matter of establishing trust -- and performing risk assessment. What mix works best in your environment is something you'll need to determine for yourself.
__________________
SIG TOO BIG! Maximum 120x60 button and no more than 3 text lines of DEFAULT SIZE and COLOR. Unless your sig is for a GFY top banner sponsor, then you may use a 624x80 instead of a 120x60.
tartane is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-29-2004, 12:36 PM   #9
tartane
Registered User
 
Join Date: Feb 2004
Location: France
Posts: 12
For Apache 1.3

CGI scripts are essentially not buffered. Every time your script does a "flush" to output data, that data gets relayed on to the client.

Some scripting languages, for example Perl, have their own buffering for output - this can be disabled by setting the $| special variable to 1. Of course this does increase the overall number of packets being transmitted, which can result in a sense of slowness for the end user.
__________________
SIG TOO BIG! Maximum 120x60 button and no more than 3 text lines of DEFAULT SIZE and COLOR. Unless your sig is for a GFY top banner sponsor, then you may use a 624x80 instead of a 120x60.
tartane is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.