Security
Tunnelry manages the certificates, keys and firewall of a VPN server, so security is the point of the product, not an extra. This page has two parts: how Tunnelry is built to protect your network, and how to report a security problem. (Polish version: SECURITY.pl.md.)
How Tunnelry protects your network
The web application is never root
The web interface runs as an unprivileged user. It cannot read the certificate authority, the server keys or
/etc/tunnelry, and it cannot change its own code. Everything that needs root is done by one small helper program,
vpnctl, which the application may call only through a fixed list of commands. The helper checks every value against an
allow-list, never starts a shell, and never accepts a file path from the web application. So even a flaw in the web
interface does not hand an attacker the server. The helper's own working files (updates, database backups) are kept in a
directory only root can use, so the application cannot swap them while root works on them.
Everything is blocked unless a role allows it
Access is described by roles: a network, one address, one port. Tunnelry turns the roles into firewall rules (nftables) on the server itself, and the default is to deny. A device cannot talk its way around its role, because the rules are enforced on the server, not by the client's configuration. IPv6 is blocked so that nothing leaks around the VPN. VPN devices cannot even ping the server, and the server's own services are closed to them except what you deliberately leave open: SSH (always, so that you can never lock yourself out, and so that you can manage the server over the VPN), the web interface according to who you allowed to open it, and DNS if you turn the built-in resolver on.
Devices cannot reach each other
Client-to-client traffic is dropped, including between OpenVPN and WireGuard devices on the same server. A stolen laptop or a former colleague's phone can only do what its role allowed, and nothing more. With WireGuard, each device may only send from its own address, so a device cannot pretend to be a device with more rights.
Every device has its own key
Every device gets its own certificate (OpenVPN) or its own key pair (WireGuard). The private key is shown once, when
the profile is created, and is not stored on the server. If a phone is lost, you revoke that one profile and it stops
working at once: the server removes it and drops a live connection. Nobody else is affected. Changing the role of a
WireGuard device gives it a new key and a new file, so an old file stops working. OpenVPN uses tls-crypt-v2, which
makes the server ignore anything that is not from a known device before a connection even starts.
Signed releases and safe updates
Every release and every update is signed with an Ed25519 key. The installer and the updater verify the signature and the checksum before anything is installed, and refuse older versions. The key is pinned when you install: a hacked download server cannot push a malicious update. An update that does not start properly is rolled back automatically, to the previous version and the previous database. There are separate keys and feeds for development builds and for releases.
Changes that cannot lock you out
A change to the firewall or the access rules is applied on trial. If you cannot reach the page afterwards, the server undoes the change by itself. SSH is always allowed, and a command on the server's console can open the web interface again if a rule ever locks it. The web interface itself can be limited to anybody, to some networks, or to people who are connected to the VPN.
Accounts and sign-in
Sign-in is protected against guessing (limits on attempts) and by short sessions and strict cookies. Two-factor authentication is offered to every administrator and is strongly recommended; an administrator can make it mandatory for everybody. Permissions are fine-grained: who may see profiles, create them, revoke them, download files, change roles, change the server. Creating a device with a broad role needs a separate permission. Risky actions ask for confirmation, and every operation is written to an audit log (who did what and when) without any secret in it.
Backups and your data
A backup is one file encrypted with AES-256 and protected by a passphrase of your choice. It is checked for tampering before it is opened, and restoring is possible only from the server's own console. Tunnelry sends nothing to anyone: no telemetry, no accounts. The only address it contacts is the update address you configured, and only when you check for updates.
What Tunnelry does not protect against
Being honest about the limits is part of security:
- Someone who already has root on the server, or physical access to it. Everything is then in their hands.
- A device before you revoke it. A stolen laptop works until you revoke its profile. The dashboard shows who is connected, and revoking is one click.
- Keeping the update signing key safe. It is the project's responsibility, and it is stored encrypted with a passphrase on a separate build machine, but whoever held it could sign an update.
- A fully privileged administrator. An administrator with every permission can do anything. The audit log keeps them accountable, it does not stop them.
- Software we do not write. Tunnelry configures OpenVPN, WireGuard, nftables, nginx and PHP, and relies on them. Keep the operating system updated, PHP included: updating Tunnelry does not update the system, and the dashboard warns when PHP updates are waiting.
- Weak choices. Two-factor authentication is optional by default, so enable it, and keep the permissions of other accounts as small as they need to be.
Tunnelry is young and has not had an independent security audit yet. The assumptions the design is built on are described in the threat model that ships with the project.
Reporting a vulnerability
Please do not open a public issue or post it anywhere public. Write privately to security@tunnelry.com.
A useful report says: which part is affected (the web application, the helper vpnctl, the installer, the update
mechanism or a generated configuration) and in which version (shown in the footer of the application), the steps to
reproduce it, and what you think an attacker could do with it. Tell us also whether you plan to publish your findings,
so that we can agree on a reasonable timeline.
You will get an answer, and a fix or a clear explanation, as fast as one person can manage. Please give the project a fair chance to fix the problem before you publish it.
Which versions are supported
The latest release receives security fixes, delivered through the signed update mechanism. Older versions are not patched: update to the latest one. Tunnelry is still at version 0.x, so a minor version may change how things work.
Scope
In scope: the web application, vpnctl, the installer, the update mechanism and the generated configuration (OpenVPN,
WireGuard, nftables, nginx, php-fpm, unbound).
Out of scope: vulnerabilities in third-party software that are not caused by how Tunnelry configures it (report those to their own projects), and attacks that require prior root access to the server.