Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > How to Ban an IP Address?

Reply
Thread Tools

How to Ban an IP Address?

 
 
Victor
Guest
Posts: n/a
 
      09-24-2006
Is it possible to ban an IP address from global.asa, or by another method?

On a shared server, I'm seeing someone from China that appears to be trying to access my
site illegally (trying to access server root via cgi-bin).

Can I test for the user from global.asa and then execute a Response.End? Or is there
another way?

Thanks!



 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      09-24-2006
Victor wrote on 24 sep 2006 in microsoft.public.inetserver.asp.general:

> Is it possible to ban an IP address from global.asa, or by another
> method?


see below

> On a shared server, I'm seeing someone from China that appears to be
> trying to access my site illegally (trying to access server root via
> cgi-bin).


Why would that be illegal?

It is only illegal, if the "perpetator" is acting illegally according to
the laws in his or her country.

> Can I test for the user from global.asa and then execute a
> Response.End? Or is there another way?


You could test in session_onstart:

<%
q = request.servervariables("remote_addr")
If q = "123.456.789.123" then Session.Abandon:Response.End
%>


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
GOogle ban www.gustando.net HTML 5 12-22-2005 09:43 AM
Re: Assault Weapon Ban Deserves Renewal Misa Mirkovic Computer Support 0 02-22-2004 10:11 PM
Assault Weapon Ban Deserves Renewal Jim Nicholson Computer Support 15 02-21-2004 07:01 PM
Annoying ban at bottom of outlook Matt Computer Support 1 07-11-2003 10:40 PM



Advertisments