04-24-2009 03:57 PM
How do I create a rule that will forward anything from a Windows CE or Windows Mobile device to a different real server than normal desktop web access
04-24-2009 04:02 PM
To forward anything from a Windows CE or Windows Mobile device to a different real server than normal desktop users.
In a packet capture from a Windows Mobile 6 smart phone we can see the User-Agent string.
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; IEMobile 6.12) HTC-SMT5800\r\n
We will match on IEMobile for the Windows Mobile Devices and Windows CE for the legacy devices and forward to a server group-id 2. Anything that does not match will go to the default group-id 1.
Of course this could be expanded to other devices such as BlackBerry. A BlackBerry User-Agent string looks like this:
User-Agent: BlackBerry8830/4.2.2 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/109\r\n
So you can simply create another rule to match "BlackBerry" and forward to group-id 2.
csw-rule "r1" header "USER-AGENT" search "IEMOBILE" case-insensitive
csw-rule "r2" header "USER-AGENT" search "WINDOWS CE" case-insensitive
csw-policy "p1" case-insensitive
match "r1" forward 2
match "r2" forward 2
default forward 1