> Hold on, you are syaing it could be a whole list of IPs in this variable?
 
yes, if an intial proxy server is configured to also refer requests to another proxy "further away" from the client, and the second proxy server is also non-transparent the second proxy server will add the first proxy server's IP to that of the client in http_x_forwarded_for.  so you would have:
 
remote_addr ==> [2nd proxy's IP]
http_x_forwarded_for ==> [original client IP], [1st proxy's IP]
 
>I believe "iif(NOT len(cgi.http_x_forwarded_for), DE(cgi.remote_addr), DE(cgi.http_x_forwarded_for))" will take of the fact that >even if a proxy is used and it does not show me the ip it forwarded it for.
 
From my understanding, if requests pass through a transparent proxy http_x_forwarded_for is never populated, so you cannot assume, just because http_x_forwarded_for is a zero length string that the client's request hasn't been proxied.
 
In addition, if a client's request is behind a firewall or router using Network Address Translation, the IP address CF sees will not be that of the client.
 
I guess the short answer is, it depends what you want to use the IP for.
 
:)
s
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Taco Fleur
Sent: Wednesday, 12 February 2003 12:25
To: CFAussie Mailing List
Subject: [cfaussie] RE: cgi. variable for proxy??

Thanks for that Simon..
 
I believe "iif(NOT len(cgi.http_x_forwarded_for), DE(cgi.remote_addr), DE(cgi.http_x_forwarded_for))" will take of the fact that even if a proxy is used and it does not show me the ip it forwarded it for.
 
Hold on, you are syaing it could be a whole list of IPs in this variable?
 
Thanks
----- Original Message -----
Sent: Wednesday, February 12, 2003 10:42 AM
Subject: [cfaussie] RE: cgi. variable for proxy??

cgi.http_x_forwarded_for is a list of one or more ips which have been replaced by non-transparent proxies during teh course of the request
 
however, unless you have complete control over your client and proxy environments, it's not 100% reliable
 
try http://www.fatoscar.com/ipDump.cfm with proxies on and off for demo...
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Taco Fleur
Sent: Wednesday, 12 February 2003 11:39
To: CFAussie Mailing List
Subject: [cfaussie] cgi. variable for proxy??

I have seen a variable to get the ip of the client a proxy does the forwarding for.
But I can't find any documentation on it anymore.
 
I believe it was cgi.forward_for
 
Anyone??
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/
---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

Reply via email to