ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » help required to read the Xforwarded-for header

Post new topic  Reply to topic
 help required to read the Xforwarded-for header « View previous topic :: View next topic » 
Author Message
asrajesh
PostPosted: Sat Jan 19, 2013 10:05 pm    Post subject: help required to read the Xforwarded-for header Reply with quote

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
View user's profile Send private message
mqjeff
PostPosted: Sun Jan 20, 2013 5:08 am    Post subject: Reply with quote

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
View user's profile Send private message
asrajesh
PostPosted: Mon Jan 21, 2013 2:05 am    Post subject: Reply with quote

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
View user's profile Send private message
mgk
PostPosted: Mon Jan 21, 2013 2:41 am    Post subject: Reply with quote

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
View user's profile Send private message
asrajesh
PostPosted: Sat Jan 26, 2013 11:24 pm    Post subject: Reply with quote

Novice

Joined: 19 Jan 2013
Posts: 20

Yes .. Thats correct.. I made mistake..

Thank you so much for your help
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » help required to read the Xforwarded-for header
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.