Best VPN solution for multi user & API

Hello fellow developers,

I’m currently researching what solutions there is for providing VPN service, my project is only for friends of mine tho.

I’ve researched on Google which there is, and I am able to find some solutions, but none with some kind of API or GUI/control panel.

I’m looking for the API, as I wish to create VPN’s on the fly with my programming.

I’ve looked into OpenVPN aswell, but it doesn’t seem to be free, which I prefer as again it’s only for my private friends.



Hi, I’d suggest you to use OpenVPN Server (free one) It has a lot of environment variables and service connection port. It supports pre and post connection scripts, which I used to dyniamicly apply firewall and shapeing rules among with dynamicly created routes depending on location of VPN. It is easy to write whatever you need in bash, or if you require more sufisticated setup on python. I use to write a Django project to track my users, who logged where and check SSH history. It took abaout a week, mostly in reading how to use django. I am using OpenVPN server since 2010 and I wold not change it for other VPN soon. I think it is most powerfull one. Plus there is one more advantage - Client to Client connection, so if to VPN users on the same server are transfering files to eachother it want load your server bandwidth. More details you can find here:

Have Fun! Dimitar

I’ve setup OpenVPN, Now just trying to learn all the options it has, plus making it work with my scripting.

But OpenVPN do offer a lots of things, many things to read up on.

Submit an 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.

I second the suggestion of OpenVPN. Here is a script for installing/managing OpenVPN:

works great and could easily be scripted for automation.

I would recommend OpenVPN. There are two OpenVPN solutions. First one is one I think you encountered: OpenVPN Access Server, which is free only for 2 client connections. For more you need to pay. But you need OpenVPN Server which is free open source VPN server for unlimited number of (concurrent) connections.

Learn more about setting up OpenVPN Server on Ubuntu 16.04.

Also there are some tutorials here about Tinc VPN but more complex: How to use Ansible and Tinc VPN Basic VPN with Tinc VPN

Hi, i am using pritunl vpn server (based on OpenVPN). The GUI is very simple to use :) Website:


I would recommend going with OpenVPN (not OpenVPN Access Server, which is paid). It supports multiple clients and adding new users is very simple. All you need to do is generate a key and sign it with the CA’s private certificate, which does not require interacting with the OpenVPN server at all.

This tutorial should walk you through installing OpenVPN server and show you how to create client certificates and configuration files using a script.

How it’s going? I try to understand, are the free solutions can be secured and private?

Have a look at pfSense. It’s a firewall distribution with a web GUI and there is a PHP shell (haven’t tried it yet) for scripting. pfSense offers many features and enables you to setup a OpenVPN server including certificate management.

Have you tried SoftEther? It’s free, and maintained by the University of Tsukuba.

I would suggest using Openswan for the said purpose. If you want the GUI as well, you can control it via webmin.


This comment has been deleted

Hi there, its better to use OpenVPN using the servers of ExpressVPN. It has the fastest connectivity in any location… trust me, I’ve been using it for the past 7 months. i downloaded it from VPNgrades

This comment has been deleted