Forum Discussion
iRule required to change Citrix ICA IP address.
Yeah. I have an iRule for that... Hold on...
Not sure whether I got the original from codeshare and then added a few bits... APM is way easier though...
You'll also need a separate VS for the ICA traffic, because you need HTTP enabled on this one, but the ICA traffic can't go through an HTTP enabled VS (Or write another iRule to detect the ICA traffic and disable HTTP processing of course)
Oh... I had to change a few bits in there on the fly (My original one actually re-wrote the SSLProxy differently)... Any syntax errors are the responsibility of the keyboard.
timing on
when CLIENT_ACCEPTED {
set al_debugFlag 2
set icapHSL [HSL::open -proto UDP -pool hsl-log-01]
set icapLogPrefix "<190>[virtual]:ica-patch-1.2HSL:[IP::client_addr]:[TCP::client_port]:"
}
when HTTP_REQUEST {
HSL::send $icapHSL "$icapLogPrefix: [HTTP::uri]"
set vipHost "[HTTP::host]"
}
catch the ICA file
when HTTP_RESPONSE {
if { [HTTP::header Content-Type] contains "application/x-ica" } {
HSL::send $icapHSL "$icapLogPrefix: application/x-ica Collecting [HTTP::header Content-Length]"
HTTP::collect [HTTP::header Content-Length]
}
}
and patch it
when HTTP_RESPONSE_DATA {
set proxy thru this VIP
set payload [HTTP::payload]
set vipHost "my.vs.address"
Wherever the SSLProxyHost exists... Re-write with the vip
set payload [ regsub -nocase -all {^SSLProxyHost=[\w\d\.\:]+\n} $payload "SSLProxyHost=$vipHost\r\n" ]
HTTP::respond 200 content $payload Content-Type [HTTP::header Content-Type]
HSL::send $icapHSL "$icapLogPrefix: Patched ICA host ==> $vipHost:444"
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com