Setting up a VPN Server in AWS or Azure?

,

Hello everyone,

I’m in the process of establishing a small business, and we require access to a specific application. However, for security reasons, we want to restrict access to this application to a static IP address. I’m considering the possibility of setting up a VPN server in either AWS or Azure to achieve this.

My idea is to use something like Netmaker or OpenVPN in one of these cloud platforms, allowing users to VPN into a Virtual Private Cloud (VPC) and then have their traffic NATed out through an Elastic IP. This way, we can ensure that access is limited to our specified IP addresses.

Before proceeding, I’d like to gather information on the feasibility of this setup and understand what costs we need to consider beyond the EC2 instance and the firewall image. Your insights and advice on this matter would be greatly appreciated!

Are your users tech savvy in some way? Technically you could combine SAML SSO with AWS SSM port forwarding to give network access without needing a full VPN.

Another option is the AWS Client VPN service. It’s more expensive than rolling your own, but it’s a lot more predictable from a pricing perspective. And lower overhead.

Then finally it’s rolling your own using EC2. The pricing there is EC2 instances + EBS storage + bandwidth out + NAT gateway + a load balancer if you want to have more than one VPN server. You also should factor in overhead of updates, any fixes that need to happen, etc.

Pritunl does all this as basically turnkey solution. Small t3a instance will handle split tunnel for low dozens of users

What you are thinking about will and has worked but there is a decent amount operational overhead for this “DIY” approach and one thing that a growing small business will encounter is that shortly after you build this setup you will encounter new secure connectivity requirement X, Y and Z …

The operational burden is higher if you are already NOT up and running with a secure and operationalized Azure or AWS environment

Long story short this is a good start but most companies purchase a commercial solution because buying off the shelf is cheaper than the human staff required to maintain and keep a DIY system online. There are lots of companies in this space who offer egress through specific IP or IPs etc.

Also - this is super obvious but IP based access controls are not enough 2023 so even with this in place you should have strong authentication and access control over that VPN tunnel – and this is another data point for looking at “zero trust” solutions that are all about the endpoint and it’s trust nature and not about what SRC IP the traffic is coming from

AWS has a decent yet simple Client VPN service that uses OpenVPN compatible client and config files if you don’t want to run an OpenVPN server yourself. It brings your traffic into a VPC which will be useful if you ever deploy other internal or private stuff for your company on AWS. It’s less featured though than running your own OpenVPN server on EC2 but it gets the job done if you just want a tunnel from staff endpoints into an AWS VPC

My $.02 only of course

OpenVPN works great and it’s pretty easy to install and maintain.

Do you want to never have to worry about it?
AWS Client VPN. Set it up with SAML access and you will never have to worry about it again. Rest solutions would require maintenance.

It just works and you probably have better stuff to do than handling a VPN solution. :slightly_smiling_face:

Use a client VPN in AWS and setup the required authorized destination and routes

OpenVPN works great, but only if you craft config files for your users that include X509 certificates (you can do this with EasyRSA and a little scripting ). With only a file and a password you will allow them to connect to the VPN, and with CCD files you’ll be able to control a lot of the client’s behaviour. Sorry for not adding more details, I’m on mobile. But all these things are documented and easy to configure (assuming you already know a little of Linux sysadmin). You can run an OpenVPN server for 10 users in a small (nano, small) AWS instance; you may need something bigger depending on the usage of the VPN and number of users.

There’s also a plugin to use TOTP with OpenVPN, if you need it. Not difficult but takes some work.

AWS provides a managed solution, but it’s more expensive than this setup. Go for that if you can afford it.

Take into account that you pay quite a penny for egress data transfer, that’s something that really can pile up on aws.

What kind of application is it? VPN is something not necessarily being the hot shit anymore, everything is evolving towards Zero Trust networking

One issue with a vpn on AWS is that, you have to pay for all your traffic sent out. It’s very expensive VPN!

AWS VPN is also expensive.

Tailscale seems a good fit for small businesses.

My small business has exactly this kind of setup, using OpenVPN to access a web application through the tunnel. It’s a little effort to setup initially (a few hours work), but after that it just works for years. In my use case cost isn’t significant and I’ve never noticed egress data transfer becoming an issue.

I did this with Wireguard a while back

You should checkout tailscale

OpenVPN Access Server is a simple and very inexpensive way to do this and now fully supports SAML. Their support is also good.

The company I work for looked into doing something like this and decided against it.

We use Okta for single sign-on and found a company offering VPN end-points and their software can tie into Okta.

We whitelist the endpoint IP address into our VPCs and employees login to Okta and then connect to the VPN client. They then can connect to the sensitive services in the VPC.

We don’t need to track who has VPN access or who has access to the backend. When people join or leave, we update Okta and their access is granted or removed for a bunch of different services.

It was worth the money to have simple management and reporting for this stuff. We could have hand-rolled something but it would be on us to manage and prove that it works as designed.

netbird, tailscale, headscale, zerotier, zscaler, cloudflare ztna are probably all worth looking into as options. I almost used pritunl and it seemed good, but wasn’t approved at my last job because it didn’t work with our saml solution, even though we were using azure ad as well anyway.

I don’t like the aws client vpn because it doesn’t support ipv6, and it’s pricey, but other than that, it’s probably a good option.

openvpn and openvpn access server are a pain to hook into saml last I checked. There is a saas version openvpn that supports saml.

If I were you I’d consider Cloudflare ZTNA. Free up to 50 users. Just drop the tunnel daemon on a server. It will initiate outbound connectivity to the Cloudflare platform and you can connect from anywhere either using a web browser directly or by first running their WARP client. Can be connected to an IdP for SSO and you also have quite a few extra options to define access policies etc.

I have some experience on this and I am not recommending you to run a business.

Have you considered traffic cost? It’s very expensive and often overlooked.

Also some sites hate traffic originating from a cloud provider as they would think you are a web crawler and throttle you a lot or put you behind intensive reCaptchas.