Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 MOD: IPGate for v3.4
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 26

Scutter
Starting Member

13 Posts

Posted - 10 February 2003 :  14:18:03  Show Profile
ah nm, sorted it, it works when I switch lockdowns off
Go to Top of Page

Munkey
Starting Member

27 Posts

Posted - 10 February 2003 :  14:46:36  Show Profile
quote:
Originally posted by Chuck McB

Banning IP Range: have a look at the link I posted above (previous page) to a possible fix

Cokkies error: can you post a link to the lines arround the error you're getting (I rember there was a problem with Type mismatch: 'rs' but I can't rember what it was.



Hey Chuck,

I tried your fix after I posted, the range still dosen't work, only the single full IP will work.

As for the Cookie Error, here are the lines (Line 178 marked in red) :

function banip()

	If mLev < 4 then

		Set rs2 = Server.CreateObject("ADODB.Recordset")

		StrSql = "SELECT IPLIST_STARTDATE, IPLIST_ENDDATE, IPLIST_STATUS, IPLIST_DBPAGEKEY " 
		StrSql = StrSql & "FROM " & strTablePrefix & "IPLIST"
		StrSql = StrSql & " WHERE ('" & userip & "' = IPLIST_STARTIP" 'find matching ips
		StrSql = StrSql & " OR '" & userhost & "' = IPLIST_STARTIP" 'find matching hosts
		StrSql = StrSql & " OR '" & userip & "' NOT LIKE '%" & IPLIST_STARTIP & "%'" 'find matching ranges
		StrSql = StrSql & " OR '" & strDBNTUserName & "' = IPLIST_MEMBERID" 'find matching members
		StrSql = StrSql & ") AND ('" & userdate & "' >= IPLIST_STARTDATE" 
		StrSql = StrSql & " AND '" & userdate & "' <= IPLIST_ENDDATE )" 

		rs2.Open StrSql, strConnString 
			
		Select Case StrIPGateLck 'check for lockdown
		Case 0 'no Lockdown
			
			if rs2.eof or rs2.bof then 'no ip found in db 
				if (StrIPGateCok <> 0 & Request.Cookies("IPGate") = 1) then 'check for banned user cookie
					Call banned()
				end if
	
				if pagekey <>"" then 'check for special access page
					Call noaccess() 
				end if
			else
				Select Case rs2("IPLIST_STATUS")
				Case 0 'banned ip 
					If StrIPGateCok <> 0 then 'set banned user cookie
					         Response.Cookies("IPGate") = "1"
Line 178 -------->		                 Response.Cookies("IPGate").Expires = ChkDate(rs("IPLIST_ENDDATE"), " " ,false)
					end if
					Call banned()
		
				Case 1 'watched ip
					If StrIPGateCok <> 0 then 'set watched user cookie
						Response.Cookies("IPGate") = "0"
						Response.Cookies("IPGate").Expires = ChkDate(rs("IPLIST_ENDDATE"), " " ,false)
					end if				

					if pagekey <> "" and pagekey <> rs2("IPLIST_DBPAGEKEY") then 
						Call noaccess()
					end if
									
				Case 2 'special access ip 
					if pagekey <> "" and pagekey <> rs2("IPLIST_DBPAGEKEY") then 
						Call noaccess()
					end if
					
				end select
			end if
		
		Case 1 'do LOCKDOWN
			Select Case rs2("IPLIST_STATUS")
			Case 0, 1  
				Call lockdown()
			Case 2 'special access ip 
				if pagekey <> "" and pagekey <> rs2("IPLIST_DBPAGEKEY") then 
					Call noaccess()
				end if
			end select
		end select
		
		rs2.close
		set rs2 = nothing
		
	end if
	
end function

Edited by - Munkey on 10 February 2003 14:47:28
Go to Top of Page

Chuck McB
Junior Member

WooYay
196 Posts

Posted - 10 February 2003 :  18:31:11  Show Profile  Visit Chuck McB's Homepage  Send Chuck McB an ICQ Message
try:
Response.Cookies("IPGate").Expires = ChkDate(rs2("IPLIST_ENDDATE"), " " ,false)
Go to Top of Page

Munkey
Starting Member

27 Posts

Posted - 11 February 2003 :  11:59:40  Show Profile
quote:
Originally posted by Chuck McB

try:
Response.Cookies("IPGate").Expires = ChkDate(rs2("IPLIST_ENDDATE"), " " ,false)



That took away the error, but the Cookies option dosen't actually add a cookie for ban, and if does, its not working. Oh well, it would be nice to get atleast the IP-Range working.
Go to Top of Page

Chuck McB
Junior Member

WooYay
196 Posts

Posted - 11 February 2003 :  13:37:11  Show Profile  Visit Chuck McB's Homepage  Send Chuck McB an ICQ Message
The cookie ban works for me.

Here's a copy of my inc_ipgate.asp

It incldes a line that means that IP ranges are logged but using the same line in the banip function doesn't work.
Go to Top of Page

arnold
Starting Member

27 Posts

Posted - 14 February 2003 :  09:41:37  Show Profile  Visit arnold's Homepage
quote:
Originally posted by Chuck McB

don't think there is any work being done on it (that's why I'm trying to get help with my modified code)



That's a pity; was already waiting for months and months. Is there an alternative? Perhaps less complete but working properly?
Go to Top of Page

schef
Junior Member

USA
164 Posts

Posted - 14 February 2003 :  12:23:38  Show Profile  Visit schef's Homepage  Send schef an AOL message
I couldn't get this mod to run correctly, but I did find this one, works great, but doesnt do cookies. I set it to be included into my pages. The top segment will ban one specific IP while the 2 bottom segments are set for a range.


<%
Select Case Request.ServerVariables("REMOTE_ADDR")
  Case "209.123.123.42","192.168.10.149"
      Response.Redirect "ipgate_banned.asp"
  Case Else
End Select





strURL = Request.ServerVariables("REMOTE_ADDR")
if left(strURL,12) = "205.123.123." then response.redirect "ipgate_banned.asp"

strURL = Request.ServerVariables("REMOTE_ADDR")
if left(strURL,8) = "152.123." then response.redirect "ipgate_banned.asp"

%>


ATV Outdoors
Go to Top of Page

schef
Junior Member

USA
164 Posts

Posted - 14 February 2003 :  12:27:14  Show Profile  Visit schef's Homepage  Send schef an AOL message
quote:
Originally posted by Chuck McB

The cookie ban works for me.

Here's a copy of my inc_ipgate.asp

It incldes a line that means that IP ranges are logged but using the same line in the banip function doesn't work.


THAT FIXED MY PROBLEM!!!! woooooooooooow... I have been looking at it for a while and this did it. It works now after I increase the expire date. Thanks!!

ATV Outdoors
Go to Top of Page

CodeName
Junior Member

296 Posts

Posted - 18 February 2003 :  04:33:09  Show Profile
Well ,

Somebody can tell with example that how to use IP ban..

What is it for That `Page Key` ? If I put that empty , I cant open My forums.. :-/

Somebody Can tell with Example Please?
Go to Top of Page

Chuck McB
Junior Member

WooYay
196 Posts

Posted - 18 February 2003 :  06:27:59  Show Profile  Visit Chuck McB's Homepage  Send Chuck McB an ICQ Message
CodeName: post in the Help: MOD Implementation I'll answer you there.
Go to Top of Page

ralphb
Starting Member

USA
1 Posts

Posted - 13 March 2003 :  20:46:45  Show Profile  Visit ralphb's Homepage  Send ralphb a Yahoo! Message
quote:
Originally posted by alex042

I changed quite a few things between the versions and it looks like I missed some things.

inc_ipgate.asp

line 113:

StrSql = StrSql & ") AND ('" & userdate & "' >= IPLIST_STARTDATE"

line 157:

StrSql = StrSql & ") AND ('" & userdate & "' >= IPLIST_STARTDATE"

line 167:

if (StrIPGateCok <> 0 & Request.Cookies("IPGate") = 1) then 'check for banned user cookie



The include may also have to be moved down farther, maybe around where the group categories are after all of the login information.



hmmm...I've tried posting the changes listed to get this to work and I still get the same error:

Error Type:
Microsoft OLE DB Provider for SQL Server (0x80040E14)
'instr' is not a recognized function name.
/forum/inc_ipgate.asp, line 117

Here's the current code I have:


	Select Case StrIPGateTyp
	Case 0 'log db ips only
		StrSql = "SELECT IPLIST_STARTDATE, IPLIST_ENDDATE, IPLIST_STATUS, IPLIST_DBPAGEKEY " 
		StrSql = StrSql & "FROM " & strTablePrefix & "IPLIST"
		StrSql = StrSql & " WHERE ('" & userip & "' = IPLIST_STARTIP" 'find matching ips
		StrSql = StrSql & " OR '" & userhost & "' = IPLIST_STARTIP" 'find matching hosts
		StrSql = StrSql & " OR instr('" & userip & "', IPLIST_STARTIP) <> 0" 'find matching ranges
		StrSql = StrSql & " OR '" & strDBNTUserName & "' = IPLIST_MEMBERID" 'find matching members
		StrSql = StrSql & ") AND ('" & userdate & "' >= IPLIST_STARTDATE"
		StrSql = StrSql & " AND '" & userdate & "' <= IPLIST_ENDDATE )"


Can someone please post the correct and complete SQL for this MOD?

Thanks,
Ralph

Ralph Brenner
Triffid
Go to Top of Page

Chuck McB
Junior Member

WooYay
196 Posts

Posted - 14 March 2003 :  05:38:35  Show Profile  Visit Chuck McB's Homepage  Send Chuck McB an ICQ Message
here's mine (I posted it in page 7 of this thread)
http://www.devilsbyte.com/temp/inc_ipgate.asp.txt
Go to Top of Page

Cyberjunkie
Junior Member

111 Posts

Posted - 22 March 2003 :  15:13:19  Show Profile
Hi this Mod was much much easier to install then I thought. The installation proces went smoothly no problems. BUT now that its installed, I cant seem to make it work..hmmm. In the Admin page for the MOD, I cant seem to make it remember the IP configuration that I have done. F.ex. I choose Yes to Banning, but when I press Submit new config then all my configuration is lost and it says as default No to everything. Plz help!!
Go to Top of Page

Orakio Rob
Starting Member

11 Posts

Posted - 25 March 2003 :  11:58:02  Show Profile  Visit Orakio Rob's Homepage
Nice MOD, my only complaint is the readme file, the mod is easy to install, but the read me is confusing...

Nice mod, Alex, thanks. But is there a way to ban guys that have dhcp?
Go to Top of Page

Jace
Starting Member

24 Posts

Posted - 25 March 2003 :  19:00:54  Show Profile
Hi guys.. Simple question..

Does this mod, logs ALL ip which connected to the forum, from it's installation? Everlasting logs?

It's possible? Maybe with another mod.. I'm looking for this fature..

Tnks
Go to Top of Page
Page: of 26 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.26 seconds. Powered By: Snitz Forums 2000 Version 3.4.07