Overview
This topic covers deploying and integrating RADIUS with Google Authenticator as a 2-form factor authentication on VMware Horizon environment.
Special thanks to my colleague, Eric Monjoin, assisted and guided me on how to setup this integration. He was the author of this public document in year 2015. A few years has passed so there are some updates to it.
Note: The guides explained in this post are experimented in a LAB environment.
Environment Setup
- Ubuntu version 18.04.04 LTS (GNU/Linux 4.15.0-76-generic x86_64
- VMware Horizon version 7.11
- VMware UAG version 3.8
Radius Server Configuration
- Register the RADIUS server IP address in your DNS forward and reverse lookup.
- Deploy a virtual machine with
Ubuntu operating system. Make sure VMtools are installed and running.
- Once the Ubuntu operating system is up and running, make sure the you are able to ping the IP address and hostname FQDN.
- Check hosts file in the RADIUS server has been properly configured with the virtual machine IP address and FQDN.
#vim /etc/hosts
- Update
your RADIUS server's Ubuntu operating system. Login as root and run the following command.
#apt-get update
#apt-get dist-upgrade - Install
NTP service on the RADIUS server to ensure time synchronization.
#apt-get install ntp
Configure the RADIUS server's source NTP server by adding it into ntp.conf file. In my example, my primary domain controller is the NTP source.
Restart the NTP service to apply changes.
#systemctl restart ntp
Check NTP service status
Run ntpq command to list the NTP time synchronization queue - Download and install PowerBroker Identity Service (PBIS). PBIS allows the RADIUS Server's Ubuntu operating system to join domain and allow domain account authentication.
#wget https://github.com/BeyondTrust/pbis-open/releases/download/9.1.0/pbis-open-9.1.0.551.linux.x86_64.deb.sh
Once download complete, make the file executeable
#chmod u+x pbis-open-9.1.0.551.linux.x86_64.deb.sh
Execute and install the PBIS
#./pbis-open-9.1.0.551.linux.x86_64.deb.sh -
Join the RADIUS server to your domain.#domainjoin-cli join [domain name] [domain account]
The [domain account] is an account with “Add Computers Account” Active Directory privilege .
Once completed, check the computer object is created in the Active Directory.
If you have only one domain (no child domains), you can change the PBIS configuration to login without specifying your domain name at the login prompt but just your login name. Type the command to change it.
#domainjoin-cli join --assumeDefaultDomain Yes
After that, reboot the Ubuntu operating system. - Install Freeradius to become a RADIUS server.
#apt-get install freeradius - Next we edit this file /etc/freeradius/3.0/users and modify the section ”Deny access for a group of users”
To disable an account to login using RADIUS, we can configure RADIUS to search for a specific security group in the Active Directory and prevent login from any users that is inside this security group.
The security group example below is = GG_S_GOOGLE_AUTH_DISABLE
DEFAULT Group == "GG_S_GOOGLE_AUTH_DISABLED", Auth-Type := Reject
Reply-Message = “Your account has been disabled.
And add the line for the default authentication type.
DEFAULT Auth-Type := PAM
- Next, edit the file /etc/freeradius/3.0/sites-enabled/default
- Next, edit the file /etc/pam.d/radiusd
Comment the following lines
@include common-auth
@include common-account @include common-password
@include common-session
- Link the PAM library.
#ln -sf /etc/freeradius/3.0/mods-available/pam /etc/freeradius/3.0/mods-enabled/pam - Restart the freeradius service
# service freeradius restart - Next, edit the file /etc/freeradius/3.0/clients.conf
Search the following example and add the following
client [FQDN_UAG_server] {
ipaddr = [FQDN_UAG_server]
secret = [secret password you want to use]
} - Restart
the free radius service again.
#service freeradius restart
VMware UAG/Horizon Configuration
-
RADIUS server is complete. Now we move on and integrate UAG with the RADIUS server.
- Configure the following
Authenticaion Type = PAP
Shared secret =[Refer to the secret that you define in /etc/freeradius/3.0/clients.conf]
Num of Authentication attempts allowed =[entirely up to you]
Number of attempts to RADIUS server =[entirely up to you]
Server Timeout in Seconds =[entirely up to you]
RADIUS Server Host name = [Radius server hostname or IP address] - For internal access without UAG, configure the Horizon Connection Server with RADIUS.
- Configure
the following
Label = Google Auth [any name you like]
Hostname = [FQDN of RADIUS server]
Authentication port = 1812
Accounting port = 1813
Authentication type = PAP
Shared secret = [Refer to the secret that you define in /etc/freeradius/3.0/clients.conf]
Server timeout = [entirely up to you]
Max attempts = [entirely up to you]
This is really cool. For the longest time, we had problems with customers wanting a free RADIUS service. This post addresses that. Good work!
ReplyDeleteNice work! There's a strong demand for 2FA solutions. This is perfect for most organisations.
ReplyDeleteExcellent work!
ReplyDeleteIs it possible to change PAP to MSCHAPv2
ReplyDeleteSorry I had not try that before. Did it work for you?
Deleteyes, however some instances may need the Radius settings in the UAG set to simple Chap as well. I have also seen match username cause issues if the remote machine is not domain joined and the local user is different that the View user. I have seen SSO still work without match username. (One other thing if you are using MSCHAP2 and have set certificates for the proxies and are adding a CA cert as well in the UAG make sure that the radius server also has them installed or they will not be able to auth with MSCHAP2.
ReplyDelete