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

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 NET IPGATE v2.2.8 Problem
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 4

gpspassion
Junior Member

260 Posts

Posted - 06 July 2004 :  14:12:05  Show Profile  Visit gpspassion's Homepage
OK, I'll wait on the lockdown ;-)
Is there a was I can log all activity on one specific discussion thread, i.e. topic.asp?TOPIC_ID=11835 ?
Go to Top of Page

gpctexas
Junior Member

320 Posts

Posted - 06 July 2004 :  16:21:05  Show Profile  Visit gpctexas's Homepage
That option for laooging may come in later at some point. All would be needed is a custom report screen which is planned at some point.

ipgate 2.4.4 RC3
http://www.gpctexas.net/ipgate_v244.zip
Go to Top of Page

gpspassion
Junior Member

260 Posts

Posted - 07 July 2004 :  22:11:18  Show Profile  Visit gpspassion's Homepage
Thanks. Possible bug report: after falling victim to a "Nigerian Spam" member tonight I mixed some "watched" and "banned" users and the "watched users" got 20 lines of "Your activity is being logged" and a "You are banned" line to top it off ?! Is that a known problem or something due to my own setup? Switching the "banned user" to "watched" maintained these 20 lines, but showed the forums. Deleting the watch on that originally watched member and putting it back, brought it back to normal!
Go to Top of Page

gpspassion
Junior Member

260 Posts

Posted - 07 July 2004 :  22:17:39  Show Profile  Visit gpspassion's Homepage
Hum...tried it again, banning that member without cookies, worked ok, adding cookies to the setting, worked ok too...wonder if there isn't some type of cookie conflict? I di have cookies on the main portal of my site, would that explain it, is there a workaround?
Go to Top of Page

gpctexas
Junior Member

320 Posts

Posted - 07 July 2004 :  23:38:38  Show Profile  Visit gpctexas's Homepage
Not sure what is going on, there was a problem at one time where the messages would display a message for every ban record, but that was fixed a while back. I'll run some tests to see if I can reproduce where the bug is at. Technically, the way the mod is setup, a ban call and a warn call can't be called at same time.

One thing you can do is check all your files that you modifed and make sure all items for mod place are correct. Also check the config_new table for duplicate records. IE there should only be 1 stripgateban etc which would happen if you ran a dbs file more than one time.

Nobody else is reporting a prob and this ver of the mod has been out for several months. Make sure inc_ipgate.asp looks exactly like this


<%
'#################################################################################
'## NET IPGATE v2.2.8 Orig Idea by alex042@aol.com(c)Aug 2002, 
'## rewritten by www.gpctexas.net Patrick@gpctexas.net March 31, 2004
'#################################################################################


cookiename="IPGate" 'must change for each forum you host on the same domain!
REDIRECT_BAN="ipgate_banned.asp"
REDIRECT_LCK="ipgate_lockdown.asp"
REDIRECT_NOA="ipgate_noaccess.asp"

If (Request.ServerVariables("HTTP_CLIENT_IP") <> "") and (lcase(Request.ServerVariables("HTTP_CLIENT_IP")) <> "unknown") then
   userip=Request.ServerVariables("HTTP_CLIENT_IP")
else
   if (Request.ServerVariables("HTTP_X_FORWARDED_FOR") <> "") and (lcase(Request.ServerVariables("HTTP_X_FORWARDED_FOR")) <> "unknown") then
      userip=Request.ServerVariables("HTTP_X_FORWARDED_FOR")
   else
      if (Request.ServerVariables("REMOTE_ADDR") <> "") and (lcase(Request.ServerVariables("REMOTE_ADDR")) <> "unknown")  then
         userip=Request.ServerVariables("REMOTE_ADDR")
      else
         userip="999.999.999.999"
      end if
   end if
end if

pagereq=Request.ServerVariables("Path_Info")
PathLen = InStrRev(pagereq,"/",-1)
pagreq = lcase(Right(pagereq,(len(pagereq)-PathLen)))
	
userhost=request.servervariables("REMOTE_HOST")
userdate=DateToStr(strForumTimeAdjust)
pageqryd=Request.ServerVariables("QUERY_STRING")
'pagreq=request.servervariables("SCRIPT_NAME")
pagereqtemp=pagreq & "?" & pageqryd 
getthecookie=Request.Cookies(trim(cookiename))
notindb=1
FoundIP=0
FoundName=0
	
pagename=pagreq
if pageqryd <> "" and Len(pagereqtemp) <= 245 then 'database field length check for access db users with a little leway
	pagreq=pagereqtemp
end if

if strIPGateBan = 1 then
	'get db records
	Set rs1 = Server.CreateObject("ADODB.Recordset")
	StrSql = "SELECT * FROM " & strTablePrefix & "IPLIST"	
	rs1.Open StrSql, strConnString
	
	do until (rs1.eof)

	dbrecord = rs1("IPLIST_STARTIP") & "."
	dbrecordarr = split(dbrecord,".")
	useriparr = userip & "."
	useriparr = split(userip,".")

		
	' FIND AN EXACT MATCH
	IF (rs1("IPLIST_STARTIP") = userip) then
		FoundIP = 1               
	End IF	 

	' Find 3 octet match
	' Requires a check to make sure 4 octet is actually empty, 
	' 123.123.123.xx
	IF FoundIP <> 1 and (dbrecordarr(3) = "")  and ((dbrecordarr(0) =  useriparr(0)) and (dbrecordarr(1) =  useriparr(1)) and (dbrecordarr(2) =  useriparr(2))) THEN 
		FoundIP = 1
	End IF	

	' Find 2 octet match
	' Requires a Check to make sure the 3rd octet is actually empty
	' 123.123.xx.xx
	IF FoundIP <> 1 and (dbrecordarr(2) = "") and ((dbrecordarr(0) =  useriparr(0)) and (dbrecordarr(1) =  useriparr(1))) then 
		FoundIP = 1          
	End IF

	' Find name match
	IF lcase(rs1("IPLIST_MEMBERID")) = lcase(strDBNTUsername) then 
		FoundName = 1          
	End IF
	
	' Expire the cookie
	if ((FoundName = 1) or (FoundIP = 1)) and rs1("IPLIST_STATUS") = 3 then
		call writethecookie ("Expired", DateAdd("d",-14,Date)) 'sets cookie date today-14 days thus expiring it
	end if

	if (FoundName = 1 or FoundIP = 1) and (rs1("IPLIST_STATUS") <> 3) and ((userdate >= rs1("IPLIST_STARTDATE")) and (userdate <= rs1("IPLIST_ENDDATE"))) then 
		if rs1("IPLIST_STATUS") = 0 and mlev < 4 then
			if strIPGateCok = 1 then
				call writethecookie ("Banned", ChkDate(rs1("IPLIST_ENDDATE"), " " ,true))
			end if
			if strIPGatetyp = 0 then
				if strIPGatelog = 1 then
			    	notindb=0
			    	call loguser()
			    end if
			end if
			call banned()
		else
			if rs1("IPLIST_STATUS") = 1 then
				if strIPGateCok = 1 then
					call writethecookie ("Watched", ChkDate(rs1("IPLIST_ENDDATE"), " " ,true))
				end if
				if strIPGatetyp = 0 then
					if strIPGatelog = 1 then
			    		notindb=0
			    		call loguser()
			    	end if
				end if
				call warnuser()
			else
				if rs1("IPLIST_STATUS") = 2 and mlev < 4 then
					Set rs3 = Server.CreateObject("ADODB.Recordset")
					PageSql = "SELECT * FROM " & strTablePrefix & "PageKeys"
	
					rs3.Open PageSql, strConnString
					do until (rs3.eof)
					
						if lcase(rs3("PAGEKEYS_PAGEKEY")) = lcase(pagename) then
						   call writethecookie ("Blocked", ChkDate(rs1("IPLIST_ENDDATE"), " " ,true))
						   call noaccess()
						end if
					
					rs3.MoveNext
    				Loop
    				checkconn(rs3)
					nullconn(rs3)
					if strIPGatetyp = 0 then
						if strIPGatelog = 1 then
			    			notindb=0
			    			call loguser()
			    		end if
					end if
				end if
			end if		
		end if	
	end if
		
	rs1.MoveNext
    Loop
    checkconn(rs1)
	nullconn(rs1)

	'not located in db at this point, start check for cookies
	if strIPGateBan = 1 then
		if notindb=1 then 
			if strIPGatecok = 1 then
		   		if getthecookie = "Banned" and mlev < 4 then
		      		if strIPGatetyp = 0 then
						if strIPGatelog = 1 then
			    			call loguser()
			    		end if
			  		end if
		      		call banned()
		   		else
		   			if getthecookie = "Watched" then
		      			if strIPGatetyp = 0 then
							if strIPGatelog = 1 then
			    				call loguser()
			    			end if
						end if
		      			call warnuser()
		      		else
		   		   		if getthecookie = "Blocked" and mlev < 4  then
		   		      		Set rs3 = Server.CreateObject("ADODB.Recordset")
					  		PageSql = "SELECT * FROM " & strTablePrefix & "PageKeys"
	
  					  		rs3.Open PageSql, strConnString
 					  		do until (rs3.eof)
					
							if lcase(rs3("PAGEKEYS_PAGEKEY")) = lcase(pagename) then
						   		call noaccess()
							end if
					
					  		rs3.MoveNext
    				  		Loop
    				  		checkconn(rs3)
					  		nullconn(rs3)
					  		if strIPGatetyp = 0 then
					   	 		if strIPGatelog = 1 then
			    		 			call loguser()
			    		 		end if
					  		end if
				   		end if
		   			end if
	 			end if
			end if
		end if
	end if
end if


if StrIPGateTyp = 1 and strIPGateBan = 1 then
 call loguser()
end if

if strIPGateLck = 1 and mlev < 4 and strIPGateBan = 1 then
  call lockdown()
end if

' functions ******************************************************

sub loguser()
	
	Set rs2 = Server.CreateObject("ADODB.Recordset")
	StrSql = "INSERT into " & strTablePrefix & "IPLOG (IPLOG_MEMBERID, IPLOG_IP, IPLOG_PATHINFO, IPLOG_DATE) "
	StrSql = StrSql & "values ('" & strDBNTUserName & "','" & userip & "','" & pagreq & "','" & userdate & "')"
	rs2.Open StrSql, strConnString 
	if rs2.State = 1 then rs2.Close
	set rs2 = nothing	
	
end sub

sub writethecookie (cookietype, cookiedate)
	
	if strIPGateCok = 1  then
	    Response.Cookies(trim(cookiename))=cookietype
	    Response.Cookies(trim(cookiename)).Expires = cookiedate
	end if

end sub

function checkconn (conn)
	if conn.State = 1 then conn.Close

end function

function nullconn (conn)
	if conn.State = 0 then set conn=nothing

end function


sub banned ()
	Select Case StrIPGateMet
	Case 0
		response.write "<br><BR><BR><BR><p align=center><b>" & StrIPGateMsg & "</b></p><br><BR><BR><BR>"
		%><!--#INCLUDE file="inc_footer.asp"--><%
		response.end

	Case 1
		Response.Redirect REDIRECT_BAN
	end select

		
	end sub
	
sub lockdown ()
	Select Case StrIPGateMet
	Case 0
		response.write "<br><BR><BR><BR><p align=center><b>" & StrIPGateLkMsg & "</b></p><br><BR><BR><BR>" 
		%>
<!--#INCLUDE file="inc_footer.asp"--><%
		response.end

	Case 1
		Response.Redirect REDIRECT_LCK
	end select

		
end sub

sub noaccess ()
	Select Case StrIPGateMet
	Case 0
		response.write "<br><BR><BR><BR><p align=center><b>" & strIPGateNoAcMsg & "</b></p><br><BR><BR><BR>" 
		%>
<!--#INCLUDE file="inc_footer.asp"--><%
	response.end
	Case 1
		Response.Redirect REDIRECT_NOA
	end select

		
end sub

sub warnuser()
	response.write "<br><center><b>Message:</b> " & StrIPGateWarnMsg & "</center>"		
end sub


%>

ipgate 2.4.4 RC3
http://www.gpctexas.net/ipgate_v244.zip
Go to Top of Page

gpspassion
Junior Member

260 Posts

Posted - 08 July 2004 :  05:36:38  Show Profile  Visit gpspassion's Homepage
Thanks, I'll take a look but that's the one I would have downloaded, right?
You don't think it could be a cookie problem?

What about adding "Forum Email" monitoring to IPGate to fight Nigerian SPAM? ;-)
Go to Top of Page

glinted
New Member

54 Posts

Posted - 06 August 2004 :  10:52:36  Show Profile  Visit glinted's Homepage
Whats the deal when banning a user, should I also lock the member or will this stop the IP & user ban from working properly. I just banned a user using his IP's (Dynamic) and a user ban but he re-registered under a different name and since his IP is dynamic then it looks like it didn't work. I never locked his account but maybe that would help?

Coupon Savings
Go to Top of Page

gpctexas
Junior Member

320 Posts

Posted - 06 August 2004 :  14:05:31  Show Profile  Visit gpctexas's Homepage
Do you have cookies enabled too? This is what the cookie is for to help slow them down, but if they knwo it exists and remove it, then there's not much you can do afterwards.

ipgate 2.4.4 RC3
http://www.gpctexas.net/ipgate_v244.zip
Go to Top of Page

glinted
New Member

54 Posts

Posted - 06 August 2004 :  21:20:21  Show Profile  Visit glinted's Homepage
hi gpctexas, yes I had cookies on but he must of cleared them, since i posted this he has tired to register under 6 differnt names. I'm going to lock the accounts now but I wasn't sure if this will effect the IP & user bans?

Coupon Savings
Go to Top of Page

gpctexas
Junior Member

320 Posts

Posted - 06 August 2004 :  23:01:17  Show Profile  Visit gpctexas's Homepage
it wont affect them. Check his ip addresss if they the first 2 or 3 octets are matching then ban him by ip subnet

ex if his ips are:
123.123.134.34
123.123.245.35
123.123.45.23

then enter
123.123. as an ip to ban

ipgate 2.4.4 RC3
http://www.gpctexas.net/ipgate_v244.zip
Go to Top of Page

gpspassion
Junior Member

260 Posts

Posted - 07 August 2004 :  18:41:24  Show Profile  Visit gpspassion's Homepage
Finally found some time to do more testing and can confirm that a watched user get the following at the top of each page:

"Message: Your or another persons activity is being logged

Message: Your or another persons activity is being logged

Message: Your or another persons activity is being logged

Message: Your or another persons activity is being logged"

Not terribly inconspicuous ;-) Do you see how I could fix this? I'll try blanking out that text in the admin section to see if it helps.
Go to Top of Page

gpspassion
Junior Member

260 Posts

Posted - 07 August 2004 :  18:54:09  Show Profile  Visit gpspassion's Homepage
Ok, "clueless coder fix" : I commented out the warnuser sub, if you have a better fix, let me know!
By the way, the "You are banned" only displays once.
Go to Top of Page

gpctexas
Junior Member

320 Posts

Posted - 07 August 2004 :  22:54:15  Show Profile  Visit gpctexas's Homepage
I'll look into the code again :)

I gotta flowchart it out to see if I can catch the wired loop.

ipgate 2.4.4 RC3
http://www.gpctexas.net/ipgate_v244.zip

Edited by - gpctexas on 07 August 2004 23:03:51
Go to Top of Page

gpspassion
Junior Member

260 Posts

Posted - 08 August 2004 :  20:25:06  Show Profile  Visit gpspassion's Homepage
Just a guess, but I wonder if it might have something to do with the fact that I was monitoring 4 pages?
Go to Top of Page

gpctexas
Junior Member

320 Posts

Posted - 08 August 2004 :  22:14:19  Show Profile  Visit gpctexas's Homepage
na, but you probably have 4 ban records setup, The last time this bug appeared, a message for every ban that was setup. I had 8 at one time and I got 8 messages.

ipgate 2.4.4 RC3
http://www.gpctexas.net/ipgate_v244.zip
Go to Top of Page
Page: of 4 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.42 seconds. Powered By: Snitz Forums 2000 Version 3.4.07