Forum Discussion

newf5learner's avatar
newf5learner
Icon for Nimbostratus rankNimbostratus
Jun 19, 2014

irules - reverse proxy with x-forwarder for http

Hi

can someone help to write multiple conditional statements in one if statement. Basically I'm trying to club the reverse proxy iRule for Lync and iRule to insert the original client IP address in an X-Forwarded-For HTTP header. I'm poor in writing irules. can someone help with basics and let me know what is going wrong if I use the following irule.

the requirement : The rule should act as reverse proxy and server should log with the original client Ip address instead of LTM's self IP address as I have SNAT automap enabled.

when HTTP_REQUEST { ([HTTP::header] insert X-Forwarded-For [IP::remote_addr]) and ([HTTP::uri] contains "WebTicket/WebTicketService.svc/Auth") } {

  switch [string tolower [HTTP::host]] { 

tokyo.lync4u.com { pool pool_test_lync13 } } } }

Its throwing me errors, I tried to work. but as I have less knowledge on irules, I want some assistance from you guys.

can someone try to amend the irule for me so that

No RepliesBe the first to reply