We provide free training for all of our products to all new clients, feel free to reach us through our training page.
- Removed the complexity of configuration.
- All or partial traffic option.
- UDP is the default protocol with a fall back to TCP over 443 if the UDP port is blocked.
- Configurable certificate key size.
- Minimized downtime thanks to our custom resilience feature.
- No more stress to recreate all the users if you lose the server.
- The downtime minimized to the time it takes to boot the EC2 Instance and mount the EFS drive.
Example use cases
Your imagination is your limit, but here are some ideas that are worth considering:
- Route all the traffic over the VPN server for remote workers.
- Secure offline resources in a private subnet and allow partial traffic for employees to access them.
- Connect two or more offices together with a secure link.
Our VPN Server has built in resilience to make sure that you don't lose all your users, lose the VPN configuration, or lose connectivity by a changing IP. For this to work, you'll need to allocate an Elastic IP and create an EFS Drive.
This product was designed for public access, but we recommend you don't allow SSH connections from the public Internet. Expose only the VPN ports and allow SSH access from the local subnet once you make your first profile for yourself.
Complete feature list
This section lists all the features of this product for easy referencing.
The product itself
- No soft limits on how many users you can create.
- No soft limits on how many users can connect to the VPN.
- Part of the configuration is done through the EC2 Instance UserData section.
- Unique server settings are stored into a EFS drive, this way it is saved to be able to terminate an instance and not lose any custom configuration (users, key, certificates etc).
If you were to use our CloudFormation file, you’d also get
- An Alarm to check for CPU Bursts.
- An Alarm to check for CPU Load.
- An Alarm to check for Disk usage.
- An Alarm to auto recover the instance if it gets terminated suddenly by AWS due to hardware failure.
- An Alarm for EC2 Instance termination protection.
- A SNS Topic to receive notifications from the above alarms.
We provide a complementary CloudFormation file. Before you click the orange button to deploy the stack, make sure to subscribe first to the product on the AWS Marketplace, and if you want to check the CloudFormation prior to deployment, follow this link. Using our CF will allow you to deploy the stack with minimal work on your part. But, if you'd like to deploy the stack by hand, check the Deploy Manually section.
What will be deployed
- 1x EC2 instance with 0x4447 custom AMI:
- 1x IAM Role.
- 1x IAM Policy.
- 1x Security Group.
- 1x Instance profile.
- 1x Elastic IP.
- 1x Elastic IP Association.
- 4x CloudWatch Alarms:
- CPU Burst.
- CPU Load.
- Disk Usage.
- EC2 Instance Recovery.
- 1x SNS Topic:
- 1x SNS Policy.
- 1x Topic Subscription.
- 1x CloudWatch Dashboard for instance overview.
- 1x EFS drive:
- 1x Mount target.
- 1x Security group.
- 1x Backup:
- 1x Plan.
- 1x Role.
- 1x Selection.
- 1x Vault.
The First Boot
The boot time of our product will be slower than if you started an instance from a clean AMI, this is due to our custom code that needs to be executed in order to prepare the product for you. This process can take a few minutes longer than usual.
Connecting to the Server
To connect to the server: get it's IP, connect to the instance over SSH with the username
ec2-user, while using the private key you selected at deployment time. If successfully connected, you should be greeted with a custom MOTD detailing the product information.
How to create a user
Run this command to send all the traffic through the VPN:
sudo ov_user_add -u USER_NAME -t all
Run this command to send only the traffic for the remote network through the VPN:
sudo ov_user_add -u USER_NAME -t partial
How to copy the profiles locally
Every time you do so, a new
.ovpn file will be created in the
openvpn_users folder located in the
ec2-user folder. You can copy the new file to your local computer using the
SCP command, like so:
scp -i ./ssh.key ec2-user@SERVER_IP:/home/ec2-user/openvpn_users/USER_NAME.ovpn .
How to delete a user
Just run the following command:
sudo ov_user_delete -u USER_NAME
How to list all the users
Since every time you create a user a
.ovpn configuration file is created, you can just list the content of the
openvpn_users folder, like so:
ls -la /home/ec2-user/openvpn_users
The output is the list of all the users you have available for your VPN server.
Test the setup
Before you go into production, make sure to test the product. This ensures that you get used to how it works.
Below we give you a list of potential ideas to consider regarding security, but this list is not exhaustive – it is just a good starting point.
- Expose to the public only the ports needed for clients to connect to the VPN
- Block public SSH access
- Allow SSH connection only from limited subnets
- Ideally allow SSH connection only from another central instance
- Don't give root access to anyone but yourself
Backup Your Data
Make sure you regularly backup your drive(s). One simple solution would be to use AWS backup.
How to change the instance type
If you need more memory and CPU capacity, you can change your instance type to a bigger one. To do so, follow these instructions:
- Go to the CloudFormation console
- Click on the stack that you want to update.
- Click the
- Keep the default selection and click
- On the new
Parameterspage, change the instance type from the drop down.
Nexttill the end.
Wait for the stack to finish updating.
How to restore from a backed up EFS drive
Restoring from a backed up EFS drive is not straightforward due to how AWS restores the drive. By design AWS restores the data (even on a new and empty drive) in special folders called:
aws-backup-restore_timestamp-of-restore. Meaning they do not recreate the original folder structure. Check how AWS restores EFS Backups to learn more.
This means you have to reorganize the drive before you use it with our product. To do so, you have two options:
- Launch a temporary EC2 Instance, mount the drive and reorganize it.
- Or you can reorganize it using our SFTP Server - Single User Setup product.
Make sure all the resources are in the same VPC, subnet, and have the correct Security Groups.
These are some of the common solutions to problems you may run into:
Not authorized for images
My CloudFormation stack failed with the following error
API: ec2:RunInstances Not authorized for images:... in the Event tab.
You have to accept the subscription from the AWS Marketplace first, before you use our CloudFormation file.
The product is misbehaving
I did follow all the instructions from the documentation.
Check if the values entered in the UserData reached the instance itself.
sudo cat /var/lib/cloud/instance/user-data.txt
UserData seams ok
The UserData reached the instance, and yet the product is not acting as it should.
Use the following command to see if there were any errors during the boot process.
sudo cat /var/log/messages | grep 0x4447
Issue with remote access
Unable to access the server over SSH.
- Ensure that your public IP address is allowed to access the EC2 instance. You will need to add an inbound rule to the Security Group used by the EC2 instance.
- Ensure you are using the right EC2 Key Pair that you provided when you launched your stack.
- Ensure you are not using the
rootuser to login as this is disabled. You need to login as
Issue with user management
The below error indicates that this instance failed to mount your EFS drive.
sudo ov_user_add -u USER_NAME No such file or directory
You will also see the following message in your dmesg.
amazon/efs/mount.log:2020-09-04 23:29:58,803 - ERROR - Failed to mount fs-90d252e8.efs.us-east-2.amazonaws.com at /etc/openvpn/easy-rsa: retu Connection timed out"
Ensure that your EFS Drive allows inbound connections on TCP Port
2049 from your Elastic IP and the EC2 subnet being used by the VPN Server.