What's the best path? I know what path I didn't want to do. To get an EC2 instance of Amazon Linux 2, we need to target the right AMIs. OpenVPN tutorials, scripts, and configurations across the internet almost exclusively target non-systemd setups. Amazon Linux, along with most other major Linux distributions, have migrated over to Systemd. I won't go into the details as to why, because entire Linux communities have gone to war on this to the point that Linux distributions have forked off. The bolded section is what makes life a bit difficult, at a configuration level, because migrating System V init based service configurations over to Systemd can be painful.
Amazon Linux 2 provides the ability to install additional software packages through the extras mechanism.Amazon Linux 2 comes with an updated Linux kernel, C library, compiler, and tools.
Amazon Linux 2 provides the systemd service and systems manager as opposed to System V init system in Amazon Linux AMI.Amazon Linux 2 is available as virtual machine images for on-premises development and testing.Amazon Linux 2 offers long-term support until June 30, 2023.Why would one want to migrate to Amazon Linux 2, from Amazon Linux? Here is a breakdown quoted straight from the Amazon Linux 2 FAQs: The YAML produced by Linux Academy seemed like a good starting point.Īmazon Linux 2 vs. Want to use that coffee shop wifi? This makes it happen. I wanted to get this up and working so that I could have a personal OpenVPN server that can be connected to by laptop or phone. Want to deep dive into more details? Keep on reading.įirst off, the original CloudFormation template from the Linux Academy blog no longer works. The VPNClientsS3Bucket created by the stack will have a client OVPN file as client/openvpn_clientuser.ovpn.It would be best to refer to the GitHub repository in the future, as it will be most up-to-date.Įnter fullscreen mode Exit fullscreen mode Want to give this a test run? This is about what the repo README describes. Otherwise, here is a mini quick-start from the bash shell. If you want more information about Linux Academy, and how I found their original CFN template, scroll to the very bottom of the post. I gave an old template a major facelift, bringing about a new version of a template blogged about by Linux Academy. Extra Packages for Enterprise Linux (EPEL), OpenVPN, and Easy-RSA.
Let's Not Hard-Code AMI IDs for Base, Default AMIs.NOTE: This worked much more like a learning tool, and I'd rather recommend something like AlgoVPN when it comes to deploying and managing your own VPN in AWS.
Want to automatically deploy an OpenVPN EC2 instance, running on Amazon Linux 2, to AWS? One that auto-produces an OVPN configuration file that is compatible with OpenVPN Connect, on both Android and iOS? This article is a breakdown of the following CloudFormation template repo: