|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
help required to read the Xforwarded-for header |
« View previous topic :: View next topic » |
Author |
Message
|
asrajesh |
Posted: Sat Jan 19, 2013 10:05 pm Post subject: help required to read the Xforwarded-for header |
|
|
 Novice
Joined: 19 Jan 2013 Posts: 20
|
Hi,
We are using WMB 7.0 and our services are deployed in two servers and clients calling loadbalancer which will distribute the load to the two servers.
The problem is, when clients calling MB services via loadbalancer, the source IP address is not coming to us. Instead, the NLB IP address is coming. So, we could not do restriction on IP. We are reading the source IP using
"CAST ( InputRoot.HTTPInputHeader."X-Remote-Addr" AS CHARACTER)"
When inquired with our system people, they said we need to read the X-forwarded-for header to read the actual source IP address.
Please help us on how to read the X-fowarded-for header from WMB.
Thanks
Regards
S. Rajesh |
|
Back to top |
|
 |
mqjeff |
Posted: Sun Jan 20, 2013 5:08 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Use a trace node to output all of the HTTP headers.
Print this out on a piece of paper.
Give it to the network folks.
Give them a large red marker.
Tell them to circle the one you should read.
And then ask them why they are making applications do security at the network layer, instead of making sure that the network prevents illegal addresses from connecting in the first place. |
|
Back to top |
|
 |
asrajesh |
Posted: Mon Jan 21, 2013 2:05 am Post subject: |
|
|
 Novice
Joined: 19 Jan 2013 Posts: 20
|
Thank you very much..
We went to network guys with our trace.. Then only, they enable this
X-forwarded-for settings in LoadBalancer. After that, we read the source IP using
CAST ( InputRoot.HTTPInputHeader."X-Forwarded-For" AS CHARACTER);
Now, it is working fine.
Thanks onceagain
Regards
S. Rajesh |
|
Back to top |
|
 |
mgk |
Posted: Mon Jan 21, 2013 2:41 am Post subject: |
|
|
 Padawan
Joined: 31 Jul 2003 Posts: 1642
|
Quote: |
We went to network guys with our trace.. Then only, they enable this
X-forwarded-for settings in LoadBalancer. After that, we read the source IP using
CAST ( InputRoot.HTTPInputHeader."X-Forwarded-For" AS CHARACTER); |
If you look a little closer at your trace you will see that the X-Forwarded-For header (and all other HTTP Headers are already CHARACTER datatypes so you do not need the CAST to read its value...
Kind regards, _________________ MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions. |
|
Back to top |
|
 |
asrajesh |
Posted: Sat Jan 26, 2013 11:24 pm Post subject: |
|
|
 Novice
Joined: 19 Jan 2013 Posts: 20
|
Yes .. Thats correct.. I made mistake..
Thank you so much for your help |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|