| Author |
Topic Search Topic Options
|
Ali Bilgrami
Senior Member
Joined: 14 April 2005
Location: Pakistan
Status: Offline
Points: 492
|
Post Options
Thanks(0)
Quote Reply
Topic: Admin/Mods Unable to Block IPs Posted: 21 October 2005 at 6:06am |
hi
im running 7.92 with a couple of 7.95 modifications on SQL 2000 server. now the problem we are facing from some time is that we are unable to stop members from posting or coming with IP Blocking. we tried blocking ranges but to no avail...what can be wrong?
|
 |
javi712
Senior Member
Joined: 22 May 2003
Location: United States
Status: Offline
Points: 488
|
Post Options
Thanks(0)
Quote Reply
Posted: 21 October 2005 at 10:09am |
|
I noticed this also on an Access Database. I would block their IP Address, yet they were still able to continue posting as if nothing.
|
 |
JJLatWebWiz
Groupie
Joined: 02 March 2005
Location: United States
Status: Offline
Points: 136
|
Post Options
Thanks(0)
Quote Reply
Posted: 21 October 2005 at 7:05pm |
This could be caused by the banned IP bug: http://forums.webwiz.net/forum_posts.asp?TID=16121
Try that change and see if the IP blocking works as it should.
Edited by JJLatWebWiz - 24 October 2005 at 11:15am
|
|
p.s. I'm not affiliated with Web Wiz Guide in any way. I'm just an average Web Wiz user repaying my debt for the use of their fine forum by trying to help other Web Wiz Guide users.
|
 |
Scotty32
Moderator Group
Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
|
Post Options
Thanks(0)
Quote Reply
Posted: 23 October 2005 at 7:50am |
|
this might be a silly question, but are your users IPs the same?
as they might have a dynamic ip, or posting from a new location
many of my users ips change often, eg AOL users
if it IS a IP Blocking problem, you could try de-activating their
account, i believe this adds a block so they cant reactive there account
i my self set up a group called "Banned" and turned forum permissions
off for this group, now i can put people in this group and they cant
post
could try this is the IP Blocking isnt working
|
|
|
 |
Ali Bilgrami
Senior Member
Joined: 14 April 2005
Location: Pakistan
Status: Offline
Points: 492
|
Post Options
Thanks(0)
Quote Reply
Posted: 24 October 2005 at 9:37am |
Scotty_32, i have such a group named "Failed!"  but u see some ppl are just stupid, they come again n again with new ids  that is why email or ip blocking is important and yes i have checked the IPS they are the same. that is why i am worried
|
 |
Ali Bilgrami
Senior Member
Joined: 14 April 2005
Location: Pakistan
Status: Offline
Points: 492
|
Post Options
Thanks(0)
Quote Reply
Posted: 24 October 2005 at 11:46am |
Thanks JJLatWebWiz your solution did work fine and solved my problem :)
although there was and a variable typo that i removed. 
here is JJLatWebWiz Code for the IP Baning Problem in WWF V 7.92 And V 7.95
it is to be replaced in ../functions/functions_common.asp....
'****************************************** '**** Banned IP's ***** '************************** **************** Private Function bannedIP()
'Declare variables Dim rsIPAddr Dim strCheckIPAddress Dim strUserIPAddress Dim blnIPMatched 'Intilise variable blnIPMatched = False 'Get the users IP strUserIPAddress = getIP()
'Intialise the ADO recordset object Set rsIPAddr = Server.CreateObject("ADODB.Recordset")
'Get any banned IP address from the database 'Initalise the strSQL variable with an SQL statement to query the database to count the number of topics in the forums If strDatabaseType = "SQLServer" Then strSQL = "EXECUTE " & strDbProc & "BannedIPs" Else strSQL = "SELECT " & strDbTable & "BanList.IP FROM " & strDbTable & "BanList WHERE " & strDbTable & "BanList.IP Is Not Null;" End If
'Query the database rsIPAddr.Open strSQL, adoCon
'Loop through the IP address and check 'em out Do while NOT rsIPAddr.EOF and NOT blnIPMatched
'Get the IP address to check from the recordset
strCheckIPAddress = rsIPAddr("IP")
'See if we need to check the IP range or just one IP address
'If the last character is a * then this is a wildcard range to be checked
If Right(strCheckIPAddress, 1) = "*" Then
&n bsp; 'Remove the wildcard charcter form the IP
strCheckIP Address = Replace(strCheckIPAddress, "*", "", 1, -1, 1) 'See if whats left of the IP matches I f strCheckIPAddress = Mid(strUserIPAddress, 1, Len(strCheckIPAddress)) Then blnIPMatched = True &nbs p; 'Else check the IP address metches E lse 'Else check to see if the IP address match If strCheckIPAddress = strUserIPAddress Then blnIPMatched = True End If
'Move to the next record rsIPAddr.MoveNext Loop
'Clean up rsIPAddr.Close Set rsIPAddr = Nothing
'Return the function bannedIP = blnIPMatched End Function
|
strCheckIP Address = strCheckIPAddress in line 40 of this code under the heading of "'Remove the wildcard charcter form the IP"
and delete the &nbs p; in line 44 under the heading " 'See if whats left of the IP matches"
great work man .... 
Edited by Ali Bilgrami - 25 October 2005 at 1:50am
|
 |
JJLatWebWiz
Groupie
Joined: 02 March 2005
Location: United States
Status: Offline
Points: 136
|
Post Options
Thanks(0)
Quote Reply
Posted: 24 October 2005 at 12:20pm |
I corrected that variable. I don't know how that got there. But, the credit for the solid fix goes to sfd19. I just posted the complete function to make the fix easier.
|
|
p.s. I'm not affiliated with Web Wiz Guide in any way. I'm just an average Web Wiz user repaying my debt for the use of their fine forum by trying to help other Web Wiz Guide users.
|
 |
Ali Bilgrami
Senior Member
Joined: 14 April 2005
Location: Pakistan
Status: Offline
Points: 492
|
Post Options
Thanks(0)
Quote Reply
Posted: 25 October 2005 at 1:51am |
In that case thanks to sfd19 as well
|
 |