Report this

What is the reason for this report?

How to secure droplets with VPN (with 2 factor authentication)

Posted on October 28, 2021

We’re a small company and are looking to secure remote access to any of our servers with a VPN solution (but still allow public traffic to some of the droplet’s servers like HTTPS, SFTP, etc); preferably one with a 2 factor auth mechanism. I’ve seen some of the DO Marketplace VPN solutions but am having a hard time understanding which one we need and what some of the implementation/configuration options might look like. Anyone have any recommendations on where we can look to start working towards a vpn solution?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

You can consider using OpenVPN or WireGuard as VPN solutions. Both of them can be easily deployed on DigitalOcean Droplets and can be configured to allow public access to certain services like HTTPS and SFTP.

OpenVPN Access Server is available on the DigitalOcean Marketplace, which comes with a simple UI for configuration and supports two-factor authentication for increased security.

Here is a detailed guide on setting up an OpenVPN server on Debian 10, which you can adapt to the distribution of your choice.

As for WireGuard, you can find a guide on setting up a WireGuard VPN server on Ubuntu 20.04 here.

Take a look at the options and guides to help you choose the best solution for your needs. For pricing details, please visit our Pricing page.

Hope that this helps!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.