MS RDS Persistence Issues
Hi,
We are working on deploying MS remote desktop services and have followed the F5 deployment guide here:
https://www.f5.com/pdf/deployment-guides/f5-microsoft-remote-desktop-services-dg.pdf
Connectivity is working as expected for Web Access, Gateway and sesssion hosts. The issue we're running into at this point, is that RDP connections either direct to the RD hosts virtual server or sent through the gateway VS are not creating persistence records on the LTM, so clients are unable to properly resume their sessions. We've tried using the following irule which does create records, but TCP collection appears to be grabbing excess data, so records are not created properly:
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 "@" } {
log local0. "Setting data to: [getfield $msrdp "@" 1]"
set username [getfield $msrdp "@" 1]
} elseif { $msrdp contains "\\" } {
log local0. "Setting data to: [getfield $msrdp "\\" 3]"
set username [getfield $msrdp "\\" 3]
} else {
set username $msrdp
log local0. "Setting data to: $msrdp"
}
set finalusername [string tolower $username]
set finalusername [string trim $finalusername]
log local0. "User Being Persisted is: |$finalusername|"
persist uie $finalusername 10800
}
TCP::release
}
Has anyone else experienced the issue with the built-in msrdp persistence profile not properly creating persistence records, and if so did you come up with a viable alternative? Or has anyone had any success deploying MSRDP persistence using LTM 11.2.1 HF4?
Thanks!