In my first blog post, I discussed Connecting a Linux Server/VPS to AWS Secure Virtual Private Cloud. This post will discuss adding more hosts to the same VPC network to accommodate multiple offices, for example. The new steps are very few but not very well documented online hence the post.
1) Start by creating a new Customer Gateway with dynamic routing in the “Customer Gateway” tab of the VPC Dashboard. Specify the appropriate IP address of the new host.
2) Then create a new VPN Connection from “VPN Connection” tab the with the Virtual Private Gateway (VPG) as the one you used in the previous setup, using dynamic routing and using the Customer Gateway you just created. Let other options remain the same.
3) Download the VPN config and repeat the process described in the previous blog-post to configure the host with the downloaded configs. Start from “The next step is to set up the VPN connection to the local gateway to make it a part of the VPC…” and end at “Finally restart all services using these commands:”
4) Edit your route table “XXXwithNAT” from the previous tutorial and add the two “Inside IP CIDR” from the “Tunnel Details” section of the “VPN Connections” page to it. The virtual private gateway, of course, should be the one that is now in use for both VPN connection.
And you’re done! You can add up to ten such hosts on your account. If you need more than ten hosts, contact Amazon and I’m sure they’ll be happy to assist. If you get stuck, contact me and I’ll equally offer assistance.
Next, Benson and I will look at running a centrally managed K8 cluster off this kind of setup with multiple hosts in the VPC communication via secure VPN tunnels. Stay tuned for that.
Also published on Medium.
Teach me thy ways Hepta.