Skip to main content
Participant
April 28, 2016
Answered

x-forwarded-for in CF 11

  • April 28, 2016
  • 1 reply
  • 3372 views

Trying to get the actual ip address of a user with coldfusion sitting behind an F5 appliance.  Researching I found the RemoteIpValve which can be placed in server.xml, but it does not seem to work on CF 11.  Does anyone know of any tricks to getting this to work or does it not work at all in CF 11?

Thanks

    This topic has been closed for replies.
    Correct answer haxtbh

    We just use CGI.HTTP_X_Forwarded_For as it is available in the CGI scope. It will probably return multiple results in a comma delimited list. The first IP is usually the real IP

    Try dumping the CGI scope OR GetHttpRequestData() to see if you can see it in there at all. The appliance may have to be configured to send the header correctly though.

    1 reply

    haxtbhCorrect answer
    Inspiring
    April 28, 2016

    We just use CGI.HTTP_X_Forwarded_For as it is available in the CGI scope. It will probably return multiple results in a comma delimited list. The first IP is usually the real IP

    Try dumping the CGI scope OR GetHttpRequestData() to see if you can see it in there at all. The appliance may have to be configured to send the header correctly though.

    VarzilAuthor
    Participant
    April 28, 2016

    Well, I can get the x_forwarded_for from the header right now.  My biggest problem is not being able to set the debug ip addresses within CF Admin.

    Inspiring
    April 28, 2016

    Not sure I understand. What is the exactly are you trying to achieve?