Search code examples
amazon-web-servicesvpnaws-vpc

How to connect to VPC using AWS managed VPN without special hardware?


I have created a VPN, customer gateway and VPN connection in AWS console to my VPC. Now I want to download the configuration file to use for my VPN client on my windows 10 computer or MAC. However each of the options seems to need special hardware to function. Is there not a software solution I can install on my windows or mac computer which will take in this configuration and connect to my VPN gateway into the VPC?


Solution

  • You have two options when connecting to the AWS VPC with a VPN. You have setup 1, but I think you want 2.

    1. AWS managed VPN
    2. Software 3rd party, like Openswan or OpenVPN

    https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpn-connections.html

    You have setup an AWS Managed VPN, which requires certain hardware for the Customer Gateway. The customer gateway is just an AWS object, you have to configure it to connect to the AWS VPN connection.

    1. Internet-routable IP address (static) of the customer gateway's external interface. The public IP address value must be static. If your customer gateway is behind a network address translation (NAT) device that's enabled for NAT traversal (NAT-T), use the public IP address of your NAT device, and adjust your firewall rules to unblock UDP port 4500.

    2. The type of routing—static or dynamic. For more information, see VPN Routing Options.

    3. (Dynamic routing only) Border Gateway Protocol (BGP) Autonomous System Number (ASN) of the customer gateway. You can use an existing ASN assigned to your network. If you don't have one, you can use a private ASN (in the 64512–65534 range). If you use the VPC wizard in the console to set up your VPC, we automatically use 65000 as the ASN.

    https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_VPN.html

    Also see https://docs.aws.amazon.com/AmazonVPC/latest/NetworkAdminGuide/Introduction.html#CGRequirements

    You'll want to setup something like OpenVPN.

    https://openvpn.net/index.php/access-server/docs/quick-start-guide.html

    I would use one of their preconfigured AMI from OpenVPN's AWS marketplace The cost is the ec2 instance cost plus license. it's free for 2 concurrent users.

    1. Deploy the AMI with a public IP.
    2. Create a user from the management UI.
    3. Download the Config and import on your OpenVPN client.