All Projects → balena-io → open-balena-vpn

balena-io / open-balena-vpn

Licence: AGPL-3.0 license
openBalena VPN

Programming Languages

typescript
32286 projects
shell
77523 projects
Dockerfile
14818 projects
rust
11053 projects

Projects that are alternatives of or similar to open-balena-vpn

Tunnelkit
Non-official OpenVPN client library for Apple platforms.
Stars: ✭ 180 (+260%)
Mutual labels:  openvpn
Oh My Vpn
Setup your own OpenVPN server in 30 seconds!
Stars: ✭ 220 (+340%)
Mutual labels:  openvpn
openvpn-status-web
Small Rack (Ruby) application serving OpenVPN status file
Stars: ✭ 14 (-72%)
Mutual labels:  openvpn
Openvpn3 Linux
OpenVPN 3 Linux client
Stars: ✭ 186 (+272%)
Mutual labels:  openvpn
Django Netjsonconfig
Configuration manager for embedded devices, implemented as a reusable django-app
Stars: ✭ 213 (+326%)
Mutual labels:  openvpn
Vopono
Run applications through VPN tunnels with temporary network namespaces
Stars: ✭ 236 (+372%)
Mutual labels:  openvpn
Docker Openvpn
🔐 Out of the box stateless openvpn-server docker image which starts in less than 2 seconds
Stars: ✭ 174 (+248%)
Mutual labels:  openvpn
openvpn-status
Parse OpenVPN status logs in Python
Stars: ✭ 79 (+58%)
Mutual labels:  openvpn
Doxycannon
A poorman's proxycannon and botnet, using docker, ovpn files, and a dante socks5 proxy
Stars: ✭ 216 (+332%)
Mutual labels:  openvpn
ceil
Helmut Hoffer von Ankershoffen experimenting with auto-provisioned RPi cluster running K8S on bare-metal
Stars: ✭ 42 (-16%)
Mutual labels:  openvpn
Ics Openvpn
OpenVPN for Android
Stars: ✭ 2,357 (+4614%)
Mutual labels:  openvpn
Docker Transmission Openvpn
Docker container running Transmission torrent client with WebUI over an OpenVPN tunnel
Stars: ✭ 2,748 (+5396%)
Mutual labels:  openvpn
Pqcrypto Vpn
Post-quantum Cryptography VPN
Stars: ✭ 241 (+382%)
Mutual labels:  openvpn
Arch Rtorrentvpn
Docker build script for Arch Linux base with ruTorrent, rTorrent, autodl-irssi, Privoxy and OpenVPN
Stars: ✭ 185 (+270%)
Mutual labels:  openvpn
openvpn-shapeshifter
This script will automatically guide you to install and configure your OpenVPN server with Shapeshifter Dispatcher (obfuscation) which will allow you to bypass the DPI blockage on OpenVPN. This setup will offer the users the freedom to choose between regular OpenVPN connection or obfuscated one, they actually can use both! OpenVPN is the VPN pro…
Stars: ✭ 59 (+18%)
Mutual labels:  openvpn
Openwrt Sfe Flowoffload Ath79
Openwrt firmware with SFE and FlowOffload
Stars: ✭ 178 (+256%)
Mutual labels:  openvpn
Openvpn Easy Setup
Bash script for easy and fast OpenVPN deploy
Stars: ✭ 230 (+360%)
Mutual labels:  openvpn
OpenVpnManagement
C# OpenVPN interface
Stars: ✭ 42 (-16%)
Mutual labels:  openvpn
alpine-qbittorrent-openvpn
qBittorrent docker container with OpenVPN client running as unprivileged user on alpine linux
Stars: ✭ 230 (+360%)
Mutual labels:  openvpn
Smartvpn Billing
Billing and auth system for VPN provider
Stars: ✭ 250 (+400%)
Mutual labels:  openvpn

openBalena VPN

Description

openBalena VPN augments an OpenVPN server with the following components/features:

  • open-balena-connect-proxy is a http connect proxy that handles connections through the vpn to services on connected devices, used by external services such as balena-proxy
  • open-balena-vpn-api which consists of an internal API for handling authentication and tracking device state, and spawns openvpn server instances
  • haproxy used for balancing new connections between openvpn instances
  • libnss-openvpn is used to handle dns lookups of devices for connections via open-balena-connect-proxy

Networking

Networking is configured by a number of environmental variables:

  • VPN_GATEWAY (optional) dictates the server end of the p2p connection
  • VPN_BASE_SUBNET in CIDR notation is the entire subnet used for all servers
  • VPN_INSTANCE_SUBNET_BITMASK is the VLSM to split VPN_BASE_SUBNET into VPN_BASE_PORT and VPN_BASE_MANAGEMENT_PORT

Given a base subnet of 100.64.0.0/10 and a per-instance VLSM of 20 a server the first instance subnet would be 100.64.0.0/20 and the second would be 100.64.16.0/20, and so forth up to 100.127.240.1/20 for the 1024th instance.

If VPN_GATEWAY is not defined then the first usable address of the instance subnet will be used in its place. This address, and the second usable address, are used to facilitate the virtual p2p connections by openvpn.

The rest of the subnet, the third usable address to the last usable address, is used as a DHCP pool for devices.

Note that the dhcp pool size will also dictate the max clients per process, with the max clients per server being max_clients_per_instance * VPN_INSTANCE_COUNT and not the size of the base subnet. A VLSM of 20 will allow for 4,094 clients per instance, and a base subnet of size /10 will allow for a total of a total of 4,194,302 clients.

Base ports are increments by the process instance ID (1-indexed) to calculate the port for that instance.

DNS

OpenVPN writes connected client information to /var/run/openvpn/server-${id}.status which are interrogated by libnss-openvpn allowing for lookup of connected device VPN addresses via uuid.

Client Authentication / State

VPN client authentication is initiated via an event from the vpn management console which proxies the credentials to the balena api which ultimately decides the fate of the client.

Accessing Clients

Connections to devices can be established via open-balena-connect-proxy which exposes a HTTP CONNECT Proxy server allowing for access to devices via a hostname in the format {deviceUUID}.balena:{port}. The destination port is limited based on the requesting user and device configuration. The listening port is configured by the VPN_CONNECT_PROXY_PORT variable.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].