Forum Discussion
John_Masgalas_4
Nimbostratus
Jun 19, 2008iRule for persistence table entries
We are load balancing 5 terminal servers and using the F5 persistence table to keep track of sessions. We have run into an issue where users that log in from a Linux based rdp client are getting a per...
JRahm
Admin
Jun 25, 2008OK, I tested this and it is working for me:
when CLIENT_ACCEPTED {
TCP::collect
}
when CLIENT_DATA {
TCP::collect 25
binary scan [TCP::payload] x11a* msrdp
log local0. "Contents after binary scan: $msrdp"
if { [string equal -nocase -length 17 $msrdp "cookie: mstshash="] } {
set msrdp [string range $msrdp 17 end]
set len [string first "\n" $msrdp]
if { $len == -1 } {
TCP::collect
return
}
if { $msrdp contains "@" } {
if { $len > 5 } {
incr len -1
log local0. "Data Persisting on: [getfield $msrdp "@" 1]"
persist uie [getfield $msrdp "@" 1]
} else { persist uie $msrdp }
}
}
TCP::release
}
Log entries:
Jun 25 15:56:46 tmm tmm[1695]: Rule rdp_persist : Contents after binary scan: Cookie: mstshash=elah@doma
Jun 25 15:56:46 tmm tmm[1695]: Rule rdp_persist : Data Persisting on: elah
Persistence Data:
PERSISTENT CONNECTIONS
| Mode universal Value elah
| virtual xx.xx.xx.xx:3389 node xx.xx.xx.xx:3389 age 29sec
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