AWS WorkSpaces provides a secure and cost-effective desktop-as-a-service solution that allows users to access their desktops from anywhere. This guide will walk you through setting up AWS WorkSpaces using AWS Managed Active Directory and integrating FreeRADIUS MFA Server installed on an EC2 instance for enhanced security.
Step 1: Setting Up AWS Managed Active Directory
- Log in to the AWS Management Console: Navigate to the Directory Service console.
- Create a Directory: Select “Set up directory” and choose “AWS Managed Microsoft AD.”
- Configure Directory Details: Provide the directory name, DNS name, and description. Select the appropriate VPC and subnets for your directory.
- Review and Create: Review the details and create the directory.
Step 2: Launching an EC2 Instance for FreeRADIUS MFA Server
- Launch an EC2 Instance: Open the EC2 console and launch a new instance. Choose an Amazon Linux 2 AMI and select an instance type (t2.micro is sufficient for this purpose).
- Configure Instance Details: Ensure the instance is in the same VPC as your AWS Managed AD and assign the necessary security groups.
- Add Storage and Tags: Add storage and tags as required.
- Configure Security Group: Open port 1812 (RADIUS Authentication) and port 22 (SSH) in the security group.
- Launch the Instance: Review the details and launch the instance.
Step 3: Installing FreeRADIUS on EC2
- Connect to the EC2 Instance: Use SSH to connect to your EC2 instance.
- Update the System: Run the following commands to update your system packages:
sudo yum update -y
- Install FreeRADIUS: Install FreeRADIUS and necessary modules:
sudo yum install freeradius freeradius-utils -y
- Configure FreeRADIUS: Edit the configuration files to integrate with AWS Managed AD.
sudo nano /etc/raddb/mods-enabled/ldap
- Set the server to your directory’s DNS name.
- Configure the bind DN and password to match your AD credentials.
- Start and Enable FreeRADIUS:
sudo systemctl start radiusd
sudo systemctl enable radiusd
Step 4: Configuring AWS WorkSpaces
- Launch AWS WorkSpaces: Navigate to the WorkSpaces console and select “Launch WorkSpaces.”
- Select Directory: Choose the AWS Managed AD directory you created earlier.
- Create a WorkSpace: Configure the WorkSpace details, including the bundle type and user information.
- Enable MFA: In the WorkSpaces directory settings, enable Multi-Factor Authentication (MFA) and point it to the FreeRADIUS server.
Step 5: Testing and Verification
- User Configuration: Ensure users are added to the AWS Managed AD and have appropriate permissions.
- MFA Testing: Verify that MFA is working by logging into AWS WorkSpaces. You should be prompted for your username, password, and an additional authentication factor configured via FreeRADIUS.
Conclusion
Setting up AWS WorkSpaces with AWS Managed Active Directory and FreeRADIUS MFA Server enhances security and provides a seamless desktop experience for your users. By following the steps outlined in this guide, you can create a robust, secure, and scalable desktop solution.