•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the MS SQL section within the Web Development category of DaniWeb, a massive community of 391,962 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,037 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS SQL advertiser:
Views: 6409 | Replies: 6
![]() |
•
•
Join Date: Jul 2005
Location: Townsville, Australia
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 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:
thank you :eek: :rolleyes:
•
•
Join Date: Jul 2005
Location: Portugal
Posts: 13
Reputation:
Rep Power: 4
Solved Threads: 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
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
•
•
Join Date: Jul 2005
Location: Townsville, Australia
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 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
anyway the code is on my blog at My blog
•
•
Join Date: Aug 2006
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
Use
"deny from 70.38.14.129"
in .htaccess file
Hope it will make some sense.
Abdul Basit
abdul.basit1299@gmail.com
"deny from 70.38.14.129"
in .htaccess file
Hope it will make some sense.
Abdul Basit
abdul.basit1299@gmail.com
•
•
•
•
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:
•
•
Join Date: Feb 2008
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 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>
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>
Last edited by peter_budo : Feb 5th, 2008 at 4:14 am. Reason: IP Guardian can be found on internet, no need to advertise your website by pointing download there
•
•
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation:
Rep Power: 8
Solved Threads: 238
•
•
•
•
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.
Last edited by peter_budo : Feb 5th, 2008 at 4:15 am. Reason: Just removing URL from quote
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
*PM asking for help will be ignored*
*PM asking for help will be ignored*
•
•
Join Date: Feb 2008
Posts: 14
Reputation:
Rep Power: 1
Solved Threads: 4
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
%>
<%
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
%>
Hence Wijaya
www.ex-Soft.tk
www.ex-Soft.tk
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb MS SQL Marketplace
- IPTables blocks all incoming traffic from other networks (*nix Software)
- Keeping a map of IP, Mac and Port number (Networking Hardware Configuration)
- Help with Perl script to verify IP addresses (Perl)
- Problems in Dynaform (Form Mail) URGENT HELP (PHP)
- Double parsing variables? (PHP)
Other Threads in the MS SQL Forum
- Previous Thread: Help with this Complecated Query
- Next Thread: get only ONE row with different fields from same table



Linear Mode