Forum Discussion
Chris_Day_10331
Nimbostratus
Dec 09, 2005Terminal Services Persistence + iRules
Good morning from Vancouver, BC!
One of our customers in Edmonton is using BIG-IP for the primary purpose of load balancing terminal services (RDP) connections. They have a requirement that ...
JRahm
Admin
Dec 09, 2005I'm just one of many messengers of the great work that the developers do here at DevCentral. Most of my contributions are rehashed from their posts. Try this:
when CLIENT_ACCEPTED {
TCP::collect
}
when CLIENT_DATA {
TCP::collect 25
binary scan [TCP::payload] x11a* msrdp
if { [string equal -nocase -length 12 $msrdp "cookie: msts"] } {
set msrdp [string range $msrdp 12 end]
set len [string first "\n" $msrdp]
if { $len == -1 } {
Didnt get whole cookie collect more
TCP::collect
return
}
if { $msrdp starts_with "hash=" } {
No session directory - username used instead
if { $len > 5 } {
incr len -1 set record [string tolower [string range $msrdp 5 $len] ]
log "adding persistence record - $record" persist uie $record 1801 adjust your timeout (in seconds)
} else {
log "No username - not persisting"
}
}
} else {
log "Cookie not found"
}
TCP::release
}Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects