Domain Join via Workspace ONE Tunnel
January 14, 2021 | by bgarmon
Updated January 20, 2021
A disclaimer: a Network guru I am not.
End goal: Get a Windows 10 laptop enrolled in Workspace ONE UEM and provide a method to join to Active Directory from a remote network.
Components needed to make this work:
- Active Directory Domain Controller (AD)
- Access to internal DNS Server
- Access to public DNS records
- Workspace ONE UEM Console version 20.10 or higher (UEM)
- Airwatch Cloud Connector (ACC)
- VMware Unified Access Gateway Appliance (UAG)
This is a home lab which means my solution is limited to both the networking hardware I have at my disposal as well as the amount of money I’m willing to throw at this problem. In a corporate network there are more sophisticated ways to achieve some of this configuration.
Active Directory sits behind the firewall of my network. To join a domain the device must have line-of-sight to a Domain Controller. What does line-of-sight mean? It means the device must be able to use NSLookup to find the DNS name of a Domain Controller and receive a valid reply. Being able to PING the Domain Controller via DNS Netbios name and FQDN are also a requirement.
A common approach to enabling support for domain join off network is to place a Read-Only-Domain-Controller (RODC) in a DMZ then make public DNS records that point to the RODC. I don’t have a DMZ and don’t like that approach so instead I’m going to establish line-of-sight by using a per-app VPN solution (VMware Workspace ONE Tunnel) that loads prior to Windows login to gain line-of-sight.
VMware Workspace One Tunnel is an agent that is installed on Windows 10. The agent communicates back to a virtual appliance running on vCenter named Unified Access Gateway (UAG). The UAG is running the Vmware Tunnel Service. In short we call this Per-App VPN.
The last caveat is that VMware is in the process of developing a couple of features that will come to market very soon under the name “Drop-Ship-Provisioning (online)” and “Drop-Ship-Provisioning (offline).” To add to the confusion the process VMware will be recommending for automation of domain join will change slightly from the process documented below however it will be referenced as a feature named Offline Domain Join (ODJ). These Vmware offerings are currently in Beta and requires a beta version of UEM, a beta version of ACC, and some additional steps which I am not documenting here at the moment. What’s important to call out here is that the process below does not automatically join the domain. The automation of the domain join will come when the VMware features go GA. That said, the work done below will lay the foundation to support these upcoming features so it’s good to go ahead and complete these steps now so you are ready for these upcoming enhancments. I will be updating this blog when the VMware Offline Domain join feature goes GA.
Let’s start by Configuring DNS Records for the UAG
- Login to the AD DNS Server
- Launch Windows Server DNS manager
- I have 2 forward lookup zones configured in DNS: aftersixcomputers.com
I make use of a CNAME (Alias) record named www in the aftersixcomputers.com lookup zone, which is how you are reading this blog.
AD DNS records live in lab.aftersixcomputers.com, so in the configuration below you’ll find that publicly *.aftersixcomputers.com are the names I use, but internally the network uses *.lab.aftersixcomputers.com.
- Confirm that a Reverse Lookup Zone exists for the subnet that UAG will be installed on.
- Select the forward lookup zone where the AD DC records reside, in my example that’s lab.aftersixcomputers.com.
- Right-click on the Forward Lookup zone and select “New Host (A or AAA)…”
- Define an internal DNS name for the UAG
- Assign this an internal IP address
- Enable “Create associated pointer (PTR) record (this creates the Reverse Lookup record).
- Click on the Refresh icon at the top of the DNS manager and confirm both the forward lookup zone and reverse lookup zone were successfully created.
- At this point it’s also a good idea to use nslookup from another device on the subnet and validate DNS resolution is working properly by doing a lookup of the records you just created.
Next Setup Public DNS Records for the UAG:
You need to put in place a method for the Internet to find the UAG via DNS. Preferably this involves a static public IP address, maybe a proxy server, or load balancer or other network front end device. I use a Ubiquiti UDM Pro at the edge and Ubiquiti has decided the UDMP doesn’t need to support more than 1 public IP thus I’m forced to use port forwarding. Thus I need to create a DNS name and an A record that points the internet to my UDMP.
- Network Solutions hosts the public DNS records for my domain. While your hosting providers process will vary, navigate to the hosting providers admin portal and find Advanced DNS settings.
- In the Advanced DNS settings, create a new A Record, for example mine is vpn.aftersixcomputers.com.
- For the IP address, use the public IP address of your edge router, in my case it’s the public IP address of the UDMP.
- The host name defined here will become the name used in the configuration of the Vmware Tunnel service.
- With the public A record created, head over to your routers configuration page for port forwarding and setup port forwarding.
- By default VMware Tunnel uses Port 8443 for Per-App VPN and it uses Port 2020 for Proxy. I use both so I have 2 port forward rules.
- The destination IPs would be the IP you previously defined in your internal DNS.
- The end result of this exercise is that a device on the internet looking for vpn.aftersixcomputers.com is now able to reach the internal IP address of the UAG to establish the connection.
Next Enable Tunnel in Workspace ONE UEM Console:
- In UEM Console choose Groups and Settings > Configurations > Tunnel
- Create your Tunnel.
- Deployment Type = Basic (Cascade is supported just not in use in my example)
- Hostname = the public DNS name you defined with your hosting provider. In my case it’s vpn.aftersixcomputers.com
- Port = 8443
- Server Authentication = Airwatch SSL
- Client Authentication = Airwatch SSL
- Networking = Enabled with “Default AWCM + API traffic via Server Traffic Rules
- Logging = Disabled
- Custom Settings not configured
- Save the configuration
- While you’re in the UEM settings go ahead and configure the Device Traffic Rule Sets that enable Domain Join as follows:
- Under the Device Traffic Rule Sets choose Edit to bring up the “Manage Traffic Assignments”
- Select the Default Assignment to bring up the Device Traffic Rules menu
- Choose “Manage Applications”
- Add the following 5 Windows applications:
5. Now that the apps are created, from the Device Traffic Rules page choose Add Rule and add each of the apps to tunnel as illustrated below.
6. Define the domain name in the Destination. In my example machines need to join my AD domain lab.aftersixcomputers.com so I’m using a wildcard of
6. Choose Save and Publish
Next enable the UAG Tunnel
The next step is to link the UAG to the UEM Tunnel configuration. This is done using the UAG Admin portal:
- Launch the UAG admin portal from your web browser by opening
- Under General Settings > Edge Service Settings > click Show and then click the Gear icon under Tunnel Settings
- Choose Enable Tunnel Settings
- Define the API Server URL in the format
where xxx equals the UEM Console url.
For example if UEM is https://CN135.awmdm.com use https://AS135.awmdm.com
- The API Server username and password is any account on the UEM server that has been granted API access rights. By default the role “Console Administrator” has this permission. Note that what you type here must match the login format used for UEM. In my lab that means the username typed in here is
- The Org Group ID also comes from the UEM server, find it by hovering over the OG name in the UEM Console and use the value found in “Group ID”
- The Tunnel Server Hostname is the PUBLIC DNS name you defined at the ISP. In my example it’s vpn.aftersixcomputers.com
- BEFORE clicking SAVE, I recommend to SSH into the UAG and tail the log files to confirm what happens next succeeds. If you have a typo in your config you won’t really see any indication in the UAG admin portal that something didn’t work but you’ll spot it immediately in the SSH logs if you do the following:
- From your SSH client, SSH as root to the UAG
- Type in (but do not press enter):
tail -f /var/log/vmware/appliance-agent/appliance-agent.log
The reason you can’t hit enter yet is that this log file doesn’t exist until the first time the SAVE button is pressed in the Tunnel Settings page.
- Make sure both SSH and Tunnel Settings page are visible on your screen at the same time. In the Tunnel Settings click SAVE and immediately switch to SSH and press enter to send the tail command. You should immediately see text scrolling in SSH. The screenshot below shows what you should be looking for to confirm success
- Flip back to the UAG General Settings page you should find a Green icon under the Edge Service Settings next to Tunnel.
- You’ve completed the UAG Tunnel Configuration. Next up are the Windows 10 device settings configuration.
Next Add VMware Tunnel for Windows to UEM Console
- Download VMware Tunnel for Windows version 2.0.4 from My.workspaceone.com
- Browse https://images.google.com and download an app icon for Workspace One Tunnel to use later in this process.
- In the UEM Console choose Apps & Books > Applications > Native > choose Add Application > Upload
- On the Edit Application fill out the tabs as follows:
- Details tab: Name > Change this to VMware Tunnel for Windows
- Details tab: Supported Processor Architecture: 64-bit
- Details tab: App Version: 2.0.4
- Details tab: Current UEM Version 126.96.36.199 (this might read Version if you are on a UEM build prior to 21.01)
- Files tab: App Uninstall Process: Custom Script Type: Input
- Files tab: App Uninstall Process: Uninstall Command:
VMwareTunnelInstaller_2.0.4.exe /uninstall /Passive
- Deployment Options tab: How to Install > Install Command:
VMwareTunnelInstaller_2.0.4.exe /install /Passive
- Deployment Options tab: How to Install > Installer Reboot Exit Code: 3010
- Deployment Options tab: How to Install > Installer Success Exit Code: 0
- Deployment Options tab: When To Call Install Complete: Choose Defining Criteria and select Add select Criteria Type File Exists with a path of
C:\Program Files\VMware\Workspace ONE Tunnel\VMwareTunnel.exe
Version of Any
- Images Tab: Choose Icon Tab > Upload an image file for Tunnel app
- Choose Save & Assign
- In the Assignment Distribution menu give it a name like “Tunnel for Windows Default
- Choose an Assignment Group
- Change the App Delivery Method to Auto
- Choose the Restrictions menu on the left and enable “Make App MDM Managed if user installed”
- Enable “Desired State Management”
- Choose Create
- Choose Save
- Choose Publish
Next Create a UEM Device Profile for VPN
- In the UEM Console choose Devices > Profiles & Resources > Profiles
- Choose Add > Add Profiles > Windows > Windows Desktop > DEVICE Profile
- Under General give the profile a name and assign it a SmartGroup
- Choose VPN Payload and fill out the following:
- Connection Name: Per-App VPN for Windows 10
- Connection Type: Workspace ONE Tunnel
- Device Traffic Rule Sets: Default – Default
- Under Custom Configuration XML add the following
<?xml version='1.0' encoding='utf-16'?> <CustomConfiguration> <StartTunnelPreLogon>true</StartTunnelPreLogon> </CustomConfiguration>
5. Configure the Trusted Network Detection to be the name of your domain.
6. Under DNS Resolution via Tunnel Gateway define how you want DNS to be resolved. In my example *.lab.aftersixcomputers.com and lab.aftersixcomputers.com are the two values defined.
Next Configure Airwatch Cloud Connector (ACC)
The ACC is what links the UEM Console to the local AD Domain for the purpose of AD user account and user group import into the UEM Console. The ACC also is responsible for delivering Certificates to devices. Soon it will gain a new feature which is the ability to deliver an Offline Domain Join blob file. For the purpose of this article, it’s assumed that you have previously configured ACC and that you have it working with your existing UEM configuration. I will be updating this section because a future version of ACC might require a few changes in order to support the new feature Offline Domain Join. If you are starting from scratch and do not yet have an ACC, follow the standard Vmware documentation to get one installed and connected.
- To be continued…
Congratulations. You’ve completed the setup and should now be able to:
- Join the Windows 10 devices to the domain via Starbucks
- Map network drives and access them off network
- Use RDP off network
- GPO’s will now apply off network