Author |
Topic |
tuttostranieri
New Member
53 Posts |
Posted - 18 September 2005 : 16:16:38
|
-------------------------------------------------------------------------------- Ok i have solved with the error i have added a variable to config.asp
STRIPGATESHOWRECS
But i need some help with the admin pages...
"I have installed succefully the mod, but i can not know how to modify my admin page for linking the new features of ipgate."
THX < |
www.tuttostranieri.it www.tuttostranieri.org admin@tuttostranieri.it |
|
|
hennep
Starting Member
Netherlands
4 Posts |
Posted - 06 January 2006 : 03:33:24
|
Hi,
I've installed ipgate 2.2.6 a long time ago. It always worked for single ip-numbers. Today I noticed that an ip-range did not work. The range 65.52.0.0/14 did not stop msnbot. Before upgrading to the latest version, I would like to know whether it is possible or not to add complete ip-ranges. Will an upgrade solve my problem?
thanks, HenneP< |
|
|
gpctexas
Junior Member
320 Posts |
Posted - 06 January 2006 : 10:52:08
|
65.52.0.0 maybe being caught as a full ip addy in that version. Lemme check current version to see if it is the case as well.
edit: Looks like newer version does fix but Im not sure. I dont dont have any files left over from the version you are using.< |
ipgate 2.4.4 RC3 http://www.gpctexas.net/ipgate_v244.zip |
Edited by - gpctexas on 06 January 2006 10:55:53 |
|
|
hennep
Starting Member
Netherlands
4 Posts |
|
gpctexas
Junior Member
320 Posts |
Posted - 07 January 2006 : 13:59:39
|
Yes that is me.
Ver 3 on hold, too many things I want to try to be in it not working like I want them to. The version in my sig does work, it is missing a database entry that goes in config_new for stripgateautoclean which is needed. Im working on beta 3 which will fix that and some minor bugs Ive found.< |
ipgate 2.4.4 RC3 http://www.gpctexas.net/ipgate_v244.zip |
|
|
StephenD
Senior Member
Australia
1044 Posts |
Posted - 07 January 2006 : 17:57:25
|
gpctexas ...as a suggestion, can you filter the reports to show/hide guests only please.< |
|
|
PaulP
Starting Member
USA
15 Posts |
Posted - 27 January 2006 : 20:57:39
|
We have installed IPGate 2.4.3 and it works extremely well with only one exception.
In a discussion board of 500 members, we have only one guy who is having a problem. When he tries to get on, he gets this message:
Microsoft VBScript runtime error '800a000d'
Type mismatch: '[string: "232, unknown"]'
/Clubhouse/Discussion/inc_ipgate.asp, line 371
It looks as if it has something to do with his IP address. The code is the function that turns an IP into a long IP.
Can anyone give me an idea of what to look for
thanks
Paul P < |
|
|
gpctexas
Junior Member
320 Posts |
Posted - 27 January 2006 : 22:42:08
|
looks like his ip address isn't returning an ip, it is getting passed the else. The list of if statements at the top is where the user ip gets figured out, somehow unknown is getting passed them.
There is another area of code the breaks down the ip address into the different octets which might also be failing. Im checking into it.< |
ipgate 2.4.4 RC3 http://www.gpctexas.net/ipgate_v244.zip |
Edited by - gpctexas on 27 January 2006 22:47:20 |
|
|
gpctexas
Junior Member
320 Posts |
Posted - 27 January 2006 : 22:50:46
|
find the section near the top of inc_ipgate.asp and replace this
If (Request.ServerVariables("HTTP_CLIENT_IP") <> "") and (lcase(Request.ServerVariables("HTTP_CLIENT_IP")) <> "unknown") then 'lets check for info here userip=Request.ServerVariables("HTTP_CLIENT_IP") else if (Request.ServerVariables("HTTP_X_FORWARDED_FOR") <> "") and (lcase(Request.ServerVariables("HTTP_X_FORWARDED_FOR")) <> "unknown") then 'lets check to see if user is behind proxy and use this ip userip=Request.ServerVariables("HTTP_X_FORWARDED_FOR") else if (Request.ServerVariables("REMOTE_ADDR") <> "") and (lcase(Request.ServerVariables("REMOTE_ADDR")) <> "unknown") then 'Other attempts for ip address failed, lets get sure fire way for ip userip=Request.ServerVariables("REMOTE_ADDR") else 'all attempts to obtain ip address have failed, defaulting to 999.999.999.999 to prevent script errors userip="255.255.255.255" end if end if end if
with this
If (trim(Request.ServerVariables("HTTP_CLIENT_IP") <> "")) and (trim(lcase(Request.ServerVariables("HTTP_CLIENT_IP")) <> "unknown")) then 'lets check for info here userip=trim(chkString(Request.ServerVariables("HTTP_CLIENT_IP"),"SQLString")) else if (trim((Request.ServerVariables("HTTP_X_FORWARDED_FOR") <> "")) and (trim((lcase(Request.ServerVariables("HTTP_X_FORWARDED_FOR")) <> "unknown")) then 'lets check to see if user is behind proxy and use this ip userip=trim(chkString(Request.ServerVariables("HTTP_X_FORWARDED_FOR"),"SQLString")) else if (trim((Request.ServerVariables("REMOTE_ADDR") <> "")) and (trim((lcase(Request.ServerVariables("REMOTE_ADDR")) <> "unknown")) then 'Other attempts for ip address failed, lets get sure fire way for ip userip=trim(chkString(Request.ServerVariables("REMOTE_ADDR"),"SQLString")) else 'all attempts to obtain ip address have failed, defaulting to 255.255.255.255 to prevent script errors userip="255.255.255.255" end if end if end if
I haven't tested the code yet so it may contain errors.< |
ipgate 2.4.4 RC3 http://www.gpctexas.net/ipgate_v244.zip |
|
|
PaulP
Starting Member
USA
15 Posts |
Posted - 28 January 2006 : 22:06:10
|
Thanks for your help. I've posted the code changes but it fails. Comes back with an error on closing brackets ")"
Found that you had doubled some of the opening ellipsis on some of the trim commands.
The code is now running, but my IP is not one of the trouble ones. Is there anyway to test the code, short of waiting for a complaint?
Paul P< |
Edited by - PaulP on 28 January 2006 22:57:41 |
|
|
gpctexas
Junior Member
320 Posts |
Posted - 29 January 2006 : 00:11:30
|
If I knew how the server was seeing his ipaddress, then I would know what to code to compensate. Will have to wait to see if there is a complaint about accessing your site.
I havent been able to reproduce this one, but it appears every once in a while. If the problem persists, I will have to some debug logging before ipgate kicks in to see what is happening.< |
ipgate 2.4.4 RC3 http://www.gpctexas.net/ipgate_v244.zip |
Edited by - gpctexas on 29 January 2006 00:15:05 |
|
|
PaulP
Starting Member
USA
15 Posts |
Posted - 29 January 2006 : 11:13:21
|
After posting the new code, my user is now getting a different error message. Still in inc_ipgate.asp, but different section:
Function Dot2LongIP (ByVal DottedIP) Dim i, pos Dim PrevPos, num If DottedIP = "" Then Dot2LongIP = 0 Else For i = 1 To 4 pos = InStr(PrevPos + 1, DottedIP, ".", 1) If i = 4 Then pos = Len(DottedIP) + 1 End If num = Int(Mid(DottedIP, PrevPos + 1, pos - PrevPos - 1)) PrevPos = pos Dot2LongIP = ((num Mod 256) * (256 ^ (4 - i))) + Dot2LongIP Next End If End Function
The error is reporting the line in red.
I had him check his IP address using dnsstuff.com: 208.59.89.57 Nothing unusual there.
What is really strange is it is only one user - makes me think it is user-specific and not site related.
Ideas?
Paul P< |
|
|
PaulP
Starting Member
USA
15 Posts |
Posted - 02 February 2006 : 21:37:26
|
gpctexas Learned a little more on the IP address problem.
The user was using a dial-up accelerator that acts sort of like a proxy server. I don't know exactly what it was passing to the code, but when you turn it off, the code runs flawlessly.
Reading the code, looks like if all failed, you dumped in 255.255.255.255 Maybe if you added "OnError, IP=" Just a thought
Paul< |
|
|
gpctexas
Junior Member
320 Posts |
Posted - 03 February 2006 : 16:40:33
|
I can probably test for numbers in the 4 octets, if that test fails, then fall back to 255.255.255.255 I'll dig into something better since the script as a whole needs some debugging info passed back and logged.< |
Edited by - gpctexas on 03 February 2006 16:42:19 |
|
|
abedir
Starting Member
1 Posts |
Posted - 07 December 2006 : 11:06:26
|
Thanks for an excellent MOD works perfectly.
My problem was regarding the IPLOG table, as there was only ever one log entry. All log were being deleted automatickly, although the 'Automatic Log Cleaning' feature was set to Off. I'm not sure if this was intented.
After checking through the code. I made a small alteration to the inc_ipgate.asp file line 74
if strIPGateBan = 1 and strIPGateLck = 0 then to
if strIPGateBan = 1 and strIPGateLck = 0 and strIPGateAutoClean <> 0 then Every thing seems to be working fine after the change even after setting 'Automatic Log Cleaning' back on again.
I need to know will this code change have adverse effects in the future? Or is there another method to stop log clearing?
Thanks again for an excellent mod.
abedir.< |
|
|
Topic |
|