Best VPN solution for multi user & API

September 22, 2016 1.7k views
API Networking VPN Ubuntu 16.04 Ubuntu Debian

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!

  • 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.

11 Answers

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

by Mitchell Anicas
In this tutorial, we will go over how to use Tinc, an open source Virtual Private Network (VPN) daemon, to create a secure VPN that your servers can communicate on as if they were on a local network. We will also demonstrate how to use Tinc to set up a secure tunnel into a private network. We will be using Ubuntu 14.04 servers, but the configurations can be adapted for use with any other OS.


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.

Want to access the Internet safely and securely from your smartphone or laptop when connected to an untrusted network such as the WiFi of a hotel or coffee shop? A Virtual Private Network (VPN) allows you to traverse...

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

  • This looks very interesting. Will look more into pritunl

    Edit: It's not free to use.

  • Hosting a few servers that run the community version and it works great!

    • Maybe you would be wiling to asset me?

      Do you control them manual, or have you made a interface to control your setup?
      Can you control bandwidth?

      Maybe you have time for at chat?

      • The documentation is pretty extensive. After a quick browse I don't think they support throttling out of the box. I have, ofcourse, not made my own interface since they have a very well built interface. Just running it on a single server but for multiple clients, so my hosts are not connected to each other in any way (for that you also need the paid version).

        • Okay. That is fine tho, I don't need the to talk to each other.

          I'll look into the free version later today, may I ping you back if I need any help?

For OpenVPN, is there any GUI? Plus, it is possible to control bandwidth, speed etc?

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

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


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

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 another answer? Share your knowledge.