During implementing quite some XenMobile 10.x solutions in the last couple of months I came across some issues that caused quite some headaches. Therefore I’d like to document and share my lessons learned in this new blog.
As all my implementations were with existing NetScaler 10.x configurations already in place, I was not able to follow all those XenMobile 10.x installation and configuration guides out there by the book. All of those blogs and guides have one thing in common: they assume your start from scratch with both XenMobile 10.x and NetScaler 10.x and thus miss the point in merging XenMobile 10.x requirements with NetScaler 10.x, i.e. adding all those nasty MDM/MAM LB VIPs, DNS records, firewall rules, certificates, Session Policies and Profiles, et al.
I’m trying to shed some light on how to add a new XenMobile 10.x installation to an already existing NetScaler Gateway configuration.
This blog is comprised of the following topics:
Work in Progress
As implementing and configuring XenMobile can be quite a huge and complex task, I intend to update this article on a regular basis in order to get as close to a comprehensive guide as possible regarding this topic.
Prerequisites & Requirements:
For starters I’d like to recommend the following blogs for all those people out there who start from scratch with both XenMobile and NetScaler, as they provide loads of information on prerequisites and all things required for a (almost) hazzle free implementation:
The XenMobile architecture is quite a beast to tame and needs a lot of mastering in order to beat all its intricacies. Just have a look at the following architecture diagram for a fully blown up XenMobile 10.x MDM+MAM solution placed in your internal network:
![XenMobile-RA-MAM-MDM]()
Recommendations:
- NetScaler Connectivity Tests
- can be found on NetScaler | Configuration | Integrate with Citrix Products | XenMobile | Test Connectivity:
![15-06-_2016_11-41-53]()
![15-06-_2016_11-46-10]()
- XenMobile Connectivity Tests
- can be found on XenMobile | Support [Wrench Tool] | Diagnostics | XenMobile Connectivity Checks:
![15-06-_2016_11-52-18]()
Enable all checks listed in the XenMobile Connectivity Checks table by activating the checkbox at the top left corner, then click Test Connectivity at the bottom right corner:
![15-06-_2016_14-23-30]()
Ensure that all XenMobile Connectivity Checks are greenlit, i.e. are passed successfully:
![15-06-_2016_14-26-10]()
In case of an error you could left-click the corresponding table entry in order to receive further information and helpful tips on the underlying issue:
![15-06-_2016_14-49-11]()
Rinse and repeat until all checks are successful.
- SSL Certificate Chain und Vulnerability Checker
Q&A:
The following articles and blogs are a must read for a deeper understanding of and an insight look into XenMobile 10.x
I tried to create a table showing required IP addresses as well as corresponding NetScaler Gateway vServers necessary for a working XenMobile implementation with an existing NetScaler Gateway configuration:
XenMobile and NetScaler IP Addresses
FQDN/Hostname | Description | IP Address | Note |
mobile.domain.de [internal]
| XenMobile Server's FQDN, internally as well as externally; internal IP points to XenMobile Server directly | 10.0.0.240 | to make XenMobile Server reachable from internal networks (for administrative purposes); dedicated DNS address record in your internal DNS Zone |
mobile.domain.de [external] | XenMobile Server's FQDN, internally as well as externally; external IP points to _XM_LB_MDM_XenMobile VIP directly (Ports 443 and 8443) | e.g. 1.2.3.4 (=> 10.0.0.228) | for registration and enrollment to successfully occur, traffic on both Ports 443 and 8443 must be directed to NetScaler Gateway's vServer IP address (_XM_LB_MDM_XenMobile) |
nsip.domain.local | NetScaler Management IP | 10.0.0.252 | |
vpx.domain.de [external] | NetScaler Gateway's external FQDN, pointing to Gateway vServer providing XenMobile Session Policy and Profile | e.g. 5.6.7.8 (=> 10.0.0.251) | existing NetScaler Gateway vServer for access to XenApp/XenDesktop as well as XenMobile resources |
_XM_MAM_LB_10.0.0.232_8443 | XenMobile Server's LB VIP on NetScaler (Port 443), referred to NetScaler Gateway vServer (vpx.domain.de) Session Profile (Account Services Address: https://mobile.domain.de:8443) | 10.0.0.232 | |
_XM_LB_MDM_XenMobileMDM_10.0.0.228_443 | XenMobile Server's LB VIP on NetScaler (Port 443), referred to by externally resolvable FQDN (mobile.domain.de) | 10.0.0.228 | |
_XM_LB_MDM_XenMobileMDM_10.0.0.228_8443 | XenMobile Server's LB VIP on NetScaler (Port 8443), referred to by externally resolvable FQDN (mobile.domain.de) | 10.0.0.228 | |
vpx.domain.de [internal] | NetScaler Gateway vServer for XenMobile access after succesful enrollment; referred to by XenMobile Server | 10.0.0.251 | provides Session Policy and Profile to redirect incoming Worx Home traffic via vpx.domain.de to XenMobile Server |
mobile.domain.de [NetScaler DNS Address Record] | XenMobile Server's FQDN, internally as well as externally; internal IP must be resolved to _XM_MAM_LB VIP from a NetScaler point of view | 10.0.0.232 | dedicated DNS address record is required on NetScaler to directly point traffic to _XM_MAM_LB VIP |
For an already existing NetScaler Gateway configuration the following Session Policy and Profile must be added to the corresponding vServer for XenMobile traffic to be supported:
Session Policy:
- Name: pol_Worx_home_vpx.domain.de
- Profile: ac_Worx_Home_vpx.domain.de
- Expression:
REQ.HTTP.HEADER User-Agent CONTAINS zenprise && REQ.HTTP.HEADER User-Agent CONTAINS CitrixReceiver && REQ.HTTP.HEADER X-Citrix-Gateway EXISTS || REQ.HTTP.HEADER User-Agent CONTAINS CitrixReceiver && REQ.HTTP.HEADER X-Citrix-Gateway EXISTS && REQ.HTTP.HEADER User-Agent CONTAINS Worx
Session Profile / Action:
Tab | Option | Override Global | Value |
Client Experience | Split Tunnel | Y | OFF |
Client Experience | Session Time Out (mins) | Y | 1440 |
Client Experience | Clientless Access | Y | ON |
Client Experience | Clientless Access URL Encoding | Y | CLEAR |
Client Experience | Plugin Type | Y | Windows/MAC OS X |
Client Experience | Single Sign-on to Web Applications | Y | n/a |
Client Experience | Credential Index | Y | PRIMARY |
Security | Default Authorization Action | Y | ALLOW |
Security | Secure Browse | Y | ENABLED |
Published Applications | ICA Proxy | Y | OFF |
Published Applications | Account Services Address | Y | https://mobile.domain.de:8443 |
NetScaler XenMobile 10 Session Profile
Troubleshooting:
Keep in mind that for troubleshooting purposes it’s always recommendable to not just turn to XenMobile’s and NetScaler’s Connectivity Tests (as mentioned above), but to its logging capabilities as well, i.e. investigating its corresponding Debug Logs, Admin Audit Logs, and User Audit Logs, which can be found under in Support [Wrench Tool] | Log Operations | Logs:
![10-06-_2016_12-13-28]()
Log Levels can be adjusted accordingly in Support [Wrench Tool] | Log Operations | Log Settings.
iOS Enrollment Issues:
Worx Home Enrollment Error – Push service on server is not enabled. Please contact the administrator.
![20160601_112119000_iOS]()
Make sure your XenMobile server has internet access and can reach ports TCP 2195 and TCP 2196 at destination APNs hosts using the public IP address 17.0.0.0/8. Have a look at Citrix eDocs – Port Requirements as well.
Worx Home Enrollment Error – Profile Installation Failed. A network error has occured.
![20160606_130239000_iOS]()
In my case it turned out that XenMobile server’s hostname deviated from my external FQDN as I configured it with an internal FQDN instead. I dug deep into XenMobile server’s Debug Log File and found the following entry while trying to enroll my iOS device:
![08-06-_2016_10-16-56]()
Unfortunately you cannot change the hostname afterwards, thus requiring you to reinstall XenMobile. So make sure that during initial configuration, while defining the XenMobile Server FQDN, it equals your external FQDN:
![08-06-_2016_08-51-36]()
![08-06-_2016_08-55-13]()
Worx Home Enrollment Error – Access to your company is not currently available.
![20160608_080510000_iOS]()
Ensure that XenMobile Server’s certificate including corresponding private key and certificate chain is complete and intact:
![08-06-_2016_09-05-43]()
Best practice is to import the server certificate in PFX file format including
- private key,
- all certificates in the certification path,
- and extended properties.
During import you should select all options as depicted:
- Import: Keystore
- Keystore type: PKCS#12
- Use as: Server
- Keystore file: <certificate.pfx>
- Password: <password to your private key>
![08-06-_2016_09-05-20]()
In the end it should look like this in order for you to successfully register and enroll a device with XenMobile:
- Server
- SSL Listener
- SAML
- APNs
![08-06-_2016_09-10-59]()
Worx Home Enrollment Error – An error occurred. The enrollment will stop.
![20160608_112129000_iOS]()
Security:
Read Anton van Pelt’s blog on hardening your NetScaler configuration in order to receive the most precious of ratings: the Qualys SSL Labs A+ Rating. Most recommendable! And there are a lot of Citrix Mobility and NetScaler Master Class videos available on YouTube. Make sure to check them out as well!
Further Reading: