Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - IP banning?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

IP banning?

 Post Reply Post Reply Page  <12
Author
MorningZ View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 May 2002
Location: United States
Status: Offline
Points: 1793
Post Options Post Options   Thanks (0) Thanks(0)   Quote MorningZ Quote  Post ReplyReply Direct Link To This Post Posted: 13 August 2003 at 11:13am

and also a note.. banning a specific IP wont block a lot of people as there are people who are on dialup or dont have a static IP on broad band.. so all they would do is disconnect and reconnect and their IP is now different.....

what i do is "mask" it a bit... for example:

Dim strBanList    'Pipe delimited list of banned IP ranges
Dim strUserIP
strBanList = '208.123.12|23.12.12.3|205.121'
strUserIP = Request.ServerVariables("REMOTE_HOST")

For each item in Split( strBanList, "|" )
    if Left( strUserIP, Len(item) ) = item then
        Response.Redirect("/somefolder/error.asp")
    end if
Next

And i also take the route of not flat out telling someone they are "banned", i make it seem like something is wrong with the site

Contribute to the working anarchy we fondly call the Internet
Back to Top
Aumuz View Drop Down
Groupie
Groupie
Avatar

Joined: 14 March 2003
Location: United States
Status: Offline
Points: 43
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aumuz Quote  Post ReplyReply Direct Link To This Post Posted: 13 August 2003 at 11:34am
ok thanks!
Back to Top
justme View Drop Down
Groupie
Groupie


Joined: 06 January 2006
Status: Offline
Points: 53
Post Options Post Options   Thanks (0) Thanks(0)   Quote justme Quote  Post ReplyReply Direct Link To This Post Posted: 11 June 2006 at 8:04am

I modified the code a little so banned people would get sent to the FBI most wanted page. LOL

Enjoy
 

<%@ Language=VBScript %>

<%

Response.Buffer = True

Dim strBanList 'Pipe delimited list of banned IP ranges

Dim strUserIP

Dim item, strURL

strURL = "http://www.fbi.gov/mostwant.htm" ' modify this line for target

strBanList = "xx.xx|xx.xx"

strUserIP = Request.ServerVariables("REMOTE_HOST")

For each item in Split( strBanList, "|" )

if Left( strUserIP, Len(item) ) = item then

Response.Redirect(strURL)

end if

Next

%>

Back to Top
 Post Reply Post Reply Page  <12

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.