source ip behind load balancer

34 views
Skip to first unread message

Gunnar

unread,
Feb 4, 2015, 10:14:22 AM2/4/15
to fusion...@googlegroups.com
Hello,

we just migrated one of our project from ACF to Railo (tomcat and mod_cfml). It runs behind a load balancer (no IP transparency) and Fusion reactor shows 
as source ip only 127.0.0.1

The load balancer adds a header which contains the source IP. Apache httpd.conf is modified to log the source ip:
LogFormat "%{x-cluster-client-ip}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" proxy
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined

SetEnvIf x-cluster-client-ip "^.*\..*\..*\..*" forwarded
CustomLog "logs/access_log" combined env=!forwarded
CustomLog "logs/access_log" proxy env=forwarded


Any idea how to show the source ip in Fusion Reactor.

Thanks,

Gunnar 

Charlie Arehart

unread,
Feb 4, 2015, 10:29:59 AM2/4/15
to fusion...@googlegroups.com

Gunnar, I have good news for you. if by that code you’re confirming that your headers show “x-cluster-client-ip” as the header with the original IP (and the FR request details “headers” tab for any request would show it also), then you just need to tell FR to use that header to show the “real” IP address.

See the Requests>Settings>Proxy, which lets you tell FR that you need it to use some alternative header for the “real” ip address. This page and feature (to see the client’s original IP address when the server is behind some proxy) is a real hidden gem in FR.

Now, you’ll see that the “proxy header” field there is a drop-down, but it doesn’t show your specific header. They do show a couple of the most common alternatives.

Here’s the next truly hidden gem (though it is mentioned in the “I” button, at least in 5.2.5): just paste the name of your header into that field.

Then check your Requests>History page to confirm that you now see the real IP’s showing up. Then do a little happy dance. :-)

Or let us know if there’s some ongoing issue.

/charlie

--
You received this message because you are subscribed to the Google Groups "FusionReactor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fusionreacto...@googlegroups.com.
To post to this group, send email to fusion...@googlegroups.com.
Visit this group at http://groups.google.com/group/fusionreactor.
For more options, visit https://groups.google.com/d/optout.

Gunnar

unread,
Feb 4, 2015, 2:21:20 PM2/4/15
to fusion...@googlegroups.com
Charlie,

thanks a lot for your quick reply: I got this running in 10 seconds. That was very easy!

Gunnar

Brad Wood

unread,
Feb 4, 2015, 2:25:36 PM2/4/15
to fusionreactor
Can we get a video of the happy dance?

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp 

ColdBox Platform: http://www.coldbox.org 

Reply all
Reply to author
Forward
0 new messages