< previous chapter | next chapter >
You can use a VPN, or virtual private network, to tunnel into the Amazon VPC and connect directly to protected resources like the database and the application servers. However, you won't need to do so when you first create your stack — feel free to skip this for now and come back to it only after you need to explore or troubleshoot your OpenEMR installation.
- Click Services, EC2, and then Launch Instance in the center of the screen.
- To the left, click AWS Marketplace and then search for OpenVPN.
- Locate OpenVPN Access Server and click Select.
- For Choose an Instance Type, select t2.small and then click Next: Configure Instance Details.
- For Network, select openemr-vpc.
- For Subnet, select Public.
- Checkbox Protect against accidental termination.
- Click Next: Add Storage
- Click Next: Add Tags
- Click Add Tag to the left.
- For Key, enter OpenEMR VPN.
- Click Next: Configure Security Group
- For Security group name, enter VPN Server.
- Click Review and Launch.
- When Boot from General Purpose dialog appears, checkbox Continue with Magnetic as the boot volume for this instance and then click Next.
- When Select an existing key pair or create a new key pair dialog shows up, select your key pair, accept the terms, and click Launch Instances.
- Wait a few moments and then click View Your Instances to the bottom right.
- Identify the recently created instance, which will not have a name.
- Click the icon in the Name column and name the instance "openemr-vpn".
- In the left pane, click Elastic IPs.
- Click Allocate new address to the top and then click Allocate.
- When A New address request succeeded appears, note the Elastic IP in a safe place.
- Click Close.
- With the new address row checkboxed, click Actions and Associate address.
- For Instance, select the openemr-vpn instance.
- Click Associate and then click Close.
- In the AWS Management Console, click EC2 and then click Running Instances.
- Checkbox the openemr-vpn instance.
- Wait for the Status Checks column value to read 2/2.
- In the bottom pane, note the IPv4 Public IP in a safe place.
- To the top, click Actions and select Networking, Change Security Groups.
- Checkbox the Application security group row, and the one named "awseb..." that is described "VPC Security Group". Make sure to leave the existing security group checked!
- Click Assign Security Groups.
- Using the IP noted from step 4, SSH into the server as openvpnas. If you aren't sure, please review How do I SSH into Instances section.
- Agree with the license, and press enter to all other answers to choose the defaults.
- Wait a few moments.
- Execute the command
sudo passwd openvpn
, set an administrative password and note it in a safe place. - Execute the command
exit
to disconnect from the SSH session. - Using a web browser, navigate to https://<<recently noted ip from step 4>>:943/admin. Note that you will be presented with a untrusted certificate warning, but it is safe to proceed.
- At the OpenVPN Admin Login page, enter openvpn for Username and your recently noted password from step 11 for Password. Click Sign In.
- Click Agree in the center of the screen.
- Using a web browser, navigate to https://<<recently noted ip from step 4>>:943/?src=connect Note that you will be presented with a untrusted certificate warning, but it is safe to proceed.
- Download and follow along with the OpenVPN wizard to install the connector software.