How To Connect To Amazon WorkSpaces Via OpenVPN?

627 Views
0 rating based on 0 reviews

Amazon Virtual Private Clouds (VPC) is a private cloud that let you launch AWS resources in a virtual network that you've defined. Amazon WorkSpaces is a desktop-as-a-service (DaaS) solution for end users to access the applications and data stored in the Amazon Cloud. This article explains how to set up an OpenVPN connection to Amazon WorkSpaces through your own VPC network and by using a single private Global IP address from Amazon EC2.

Connect to amazon WorkSpaces via OpenVPN

Generally, VPN or Virtual Private Network is used to remotely access other positions internet. Let me explain it elaborately; Think you build a system with your work or home private network, here you can only use your system from your home or office.

You are not allowed to use your system outside of your home or office. Think you have to go outside of your office or home for some days and you also have to work with your system, then what will you do now? Fortunately, you have a solution to overcome this issue and the solution is VPN. This VPN service remotely gives you access to your private network. We know that Work Spaces are built under one VPC and a minimum of two subnets. Normally, we set our Work Spaces with the private subnet, this allows you to access the Work Spaces with your private network which you select before. This private subnet is used for more security of your system.

Now working outside of your private network, you have to connect the private network with the VPN. This VPN service is also a secure gateway to access your private network publicly from anywhere.

Why & way to connect OpenVPN to Amazon Work Spaces

OpenVPN is the service and the apps by which you can connect the Work Spaces private network to a public network and allows you to access the network from anywhere you want. Some OpenVPN services are free from the Amazon Marketplace. By adding the VPN on your created private network which is used in your Work Spaces means you add the VPN to your Work Spaces.

Pre-Requirement

  • PuTTYgen application
  • PuTTY application

The process to connect the OpenVPN with your Work Spaces

  1. At first, open a browser and log in to your AWS console by clicking on https://aws.amazon.com/
  2. Now go to ‘Instance’ from the left navigation bar. Here you will see a private Instance list.
  3. Click on the ‘Launch Instance’ now.Launching the Instance
  4. Now click on the ’AWS Marketplace’ then search the OpenVPN in the search box. Here you will have many search results. Choose the ‘OpenVPN Access Server’. Click select right of this name.Selecting Server
  5. Now it will show info of OpenVPN; click the ‘Continue’ button.
  6. Now select the type to ‘t2 Micro’ for free access. Click on the ‘Next: Configure Instance Details’ for advance settings.
  7. From the Configure Instance page choose your VPC in the Network section & also select a Subnet that is pointed to Internet Gateway. Now enable the Auto-assign Public IP. Now click the ‘Next: Add Storage’ button.Configure Instance page
  8. Do nothing on the Add Storage page and click the ‘Next: Add Tags’ button to configure the next page.
  9. Put the value name on the tag page as VPN-Server and click ‘Next: Configure Security Group’.Add Tag Page
  10. In the Configure Security Group page set all the Sources to ‘Anywhere’ and click ‘Review & Launch’ to go to the final page setup.Configure Security Group page
  11. On the Preview page Click on the ‘Launch’ button.
  12. Now choose ‘Create a new key pair’ then give your key name and click on the ‘Download Key Pair’ button. Finally, click the ‘Launch Instance’ button.Download Key Pair
  13. Now convert the ‘.pem’ file to the ‘.ppk’ file by the PuTTYgen application. For this Select ‘Load’ and upload the file downloaded earlier. Then, click ‘Save Private Key’ and save with the ‘.ppk’ extension.Private Key Generator
  14. Now open the .ppk file on the PuTTY application, select your favorite interphase and click ‘Open’.
  15. Write ‘OpenVPN’ after login as. And tap enter.Setup 1
  16. Now write ‘yes’ two times in the red marked area of the screen and press ‘enter’ on the keyboard.Setup two
  17. Press ‘Enter’ several times up to the red-underlined.Setup three
  18. Now copy the URL and press enter & write the same line in the image. Then set the password.Setup 4
  19. Now you have to open the URL in the browser and have to log in with ‘OpenVPN’ & the password you created before.Log in to VPN website
  20. Download, Install & open the app according to your device.Download the App
  21. Open the OpenVPN app and continue with your server IP, Username & Password. Press connect to build a VPN connection.Login to VPN app

Summary: Connect to amazon WorkSpaces via OpenVPN

  • VPC resources.
  • Configure a security group.
  • Create an Amazon Machine Image.
  • Create a key pair.
  • Launch an instance.
  • Connect to your OpenVPN server using SSH.
  • Copy the OpenVPN configuration and client files to your computer.
  • Install the OpenVPN client on your computer.