0

Hi, this is my first post. I have a website www.psychopanic.com and theres an IP address that I want banned from accessing my site (203.213.0.10). Does anyone here know how to make a MsSQL script that can ban ip addresses? my webhosting Plesk control panel only lets me use MsSQL.
thank you :eek: :rolleyes:

6
Contributors
6
Replies
7
Views
12 Years
Discussion Span
Last Post by huangzhi
0

G'd evening kitkatsavvy!
I'm not aware of any SQL functionality that you can implement to block an IP address, nor i have any experience in web programming.
With sql you can limit the privileges of any user assigning that user to a given roll or just to delete him from your db users.
I have no idea how you can do that in the web environment, but i supose that if you can get the user's ip you also can redirect him out of your site.
I think you should (or any mod) move this thread to another forum, since your question is more related with web programming than with SQL.
Good luck
Estuardo

0

sorry about this post. since i posted that, i learnt that my webhoster supports php, plus a whole bunch of other codes like asp etc. i got a bit of help from my irc friends, and now i have 2 scripts for my website. one is to ban single ip addresses, and the other is to ban ranges of ip addresses.. i didnt know i could just change my webpages to .php instead of .htm to do this.
anyway the code is on my blog at My blog

0

IP Guardian is designed to be an easy to use IP filtering system to secure your ASP pages against unauthorized visitors. You simply enter the IP addresses into the program and it does the rest.

Statistics will show you how many times a banned IP has attempted to visit your page.

The next version will feature even more filtering options and include a temporary ban feature.

<URL snipped>

0

IP Guardian is designed to be an easy to use IP filtering system to secure your ASP pages against unauthorized visitors. You simply enter the IP addresses into the program and it does the rest.

Statistics will show you how many times a banned IP has attempted to visit your page.

The next version will feature even more filtering options and include a temporary ban feature.

<snipped>

OP asked this question LONG LONG time ago. Please check the date before bumping an old thread.

0

you need to create table tb_IPList (IP varchar(20)) and code (in ASP) below:
<%
option explicit

Dim Conn as object
Dim RS as object

set Conn = createobject("ADODB.Connection")
Conn.Mode = 3
Conn.open "DRIVER={SQL Server};Server=YourServer;Database=YourDB"

set RS = Conn.execute ("select 1 from tb_IPList where IP = '" + Request.ServerVariables("REMOTE_ADDR")) + "'"

if not RS.EOF then
--> goto another page or error msg
else
--> continue
%>

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.