HTTP_X_FORWARDED_FOR and REMOTE_ADDR

I have asked this before but with no reply.
When doing IP logging and restricted access to control panels / files etc I ask people 
to register their IP.

Now what a person thinks their IP is may not always be the same as REMOTE_ADDR as 
sometimes proxies are used a nd the REAL IP is in the variable HTTP_X_FORWARDED_FOR.

Any comments on how anyone has got around this?

If I say 

<CFIF IsDefined("HTTP_X_FORWARDED_FOR")><CFSET ClientIP = HTTP_X_FORWARDED_FOR>
<CFELSE><CFSET ClientIP = REMOTE_ADDR>
</CFIF>

do you think there will be any problems?

Thanks

Allan

Reply via email to