Ready-to-use server
OpenVPN Community Edition
Secure access to your network, wherever you work.
- Automatic security updatesDebian support through June 2030
- You're in controlRun on your hardware or in the cloud.
- Free and open sourceUse, inspect and customize the code.
Your server. Your choice.
Run OpenVPN Community Edition on AWS
Choose where you want to manage it.
OpenVPN Community Edition screenshots
Give your team secure access to your private network from anywhere. Connect separate office networks, reach resources in your Amazon VPC, or protect traffic on public Wi-Fi with a VPN you control. TurnKey packages OpenVPN Community Edition with guided setup and tools for creating and sharing connection profiles, so you can get connected with less manual configuration.
This server includes all the standard features in TurnKey Core, and on top of that:
OpenVPN configurations:
Initialization hooks to configure common OpenVPN deployments such as "site-to-site" server or client and gateway profiles.
All profiles support SSL/TLS certificates for authentication and key exchange.
Server and gateway deployments include a convenience script to add clients, generating all required keys and certificates, as well as a unified ovpn profile for clients to easily connect to the VPN.
Expiring obfuscated HTTPS urls can be created for clients to download their profiles (especially useful with mobile devices using a QR code scanner).
The server profile supports a private subnet configuration, enabling clients to reach servers behind the OpenVPN server.
The gateway profile configures connecting clients to tunnel all their traffic through the VPN.
When adding clients in a server or gateway deployment, an optional parameter can be given to enable computers on a subnet behind the client to connect to the VPN.
For added security, OpenVPN is configured to drop privilages, run in a chroot jail dedicated to CRL, and uses tls-auth for HMAC signature verification protecting againsts DoS attacks, port flooding, port scanning and buffer overflow vulnerabilities in the SSL/TLS implementation.
See the Usage documentation for further details, including Amazon VPC notes and cloudformation template.
Note: OpenVPN® is a registered trademark of OpenVPN Inc. Neither TurnKey Linux nor this software server are affiliated with or endorsed by OpenVPN Inc.
Potential issues caused by timezone mismatch
Some VPN client applications expect certificate timestamps to be in local time. However, by default, TurnKey servers use UTC time.
That can lead to the creation of certificates, which according to local time, are not yet valid. Under these circumstance, connection will fail.
To avoid that, please set the timezone for your TurnKey OpenVPN server prior to further configuration. To do that via the commandline:
dpkg-reconfigure tzdata
For further info re setting timezone, please see this TurnKey Blog post.
Credentials (passwords set at first boot)
Webmin, SSH: username root
Updates and v19 validation
OpenVPN Community Edition, Easy-RSA and iptables are installed and updated from Debian 13 Trixie's signed repositories. The server adds no third-party application package source. The focused v19 build, firstboot, authenticated tunnel, gateway data-path, restart and nonmutating updater checks are mapped in the v19 testing notes.
Run from browser
V 19.0.3
V 18.1
GitHub
Usage details & Logging in for Administration
No default passwords: For security reasons there are no default passwords. All passwords are set at system initialization time.
Ignore SSL browser warning: browsers don't like self-signed SSL certificates, but this is the only kind that can be generated automatically. If you have a domain configured, then via Confconsole Advanced menu, you can generate free Let's Encypt SSL/TLS certificates.
Web - point your browser at either:
- http://12.34.56.789/ - not encrypted so no browser warning
- https://12.34.56.789/ - encrypted with self-signed SSL certificate
Username for OS system administration:
Login as root except on AWS marketplace which uses username admin.
- Point your browser to:
- https://12.34.56.789:12321/ - System control panel
- https://12.34.56.789:12320/ - Web based command line terminal
- Login with SSH client:
ssh root@12.34.56.789
Special case for AWS marketplace:
ssh admin@12.34.56.789
* Replace 12.34.56.789 with a valid IP or hostname.
Documentation
Links of value:
- TKL OpenVPN app page (or on GitHub)
-
TurnKey Linux OpenVPN app-specific docs:
- README
- Site-to-Site (office to Amazon VPC)
- Gateway (secure internet access)
Container Configuration Considerations
If your OpenVPN server or client is failing with errors like:
ERROR: Cannot open TUN/TAP dev /dev/net/tun: No such file or directory
You are probably missing the tun0 interface, which is the network interface for your encrypted tunnel. Try these steps to see if you are able to start your VPN service:
service openvpn stop mkdir /dev/net mknod /dev/net/tun c 10 200 chmod 666 /dev/net/tun service openvpn start
If your OpenVPN server starts successfully, you can add a startup script to create the tun0 interface at boot time:
#! /bin/sh
# Script originally developed by Wolfgang
### BEGIN INIT INFO
# Provides: tun
# Required-Start: $network
# Required-Stop: $openvpn
# Default-Start: S 1 2
# Default-Stop: 0 6
# Short-Description: Make a tun device.
# Description: Create a tundev for openvpn
### END INIT INFO
# Aktionen
case "$1" in
start)
mkdir /dev/net
mknod /dev/net/tun c 10 200
chmod 666 /dev/net/tun
;;
stop)
Then activate the script at boot time:
chmod 755 /etc/init.d/tun update-rc.d tun defaults
Be sure to reboot your container to make sure that your VPN service starts properly.
OpenVPN Client as a Router
You may want your Turnkey Linux OpenVPN server to connect to an OpenVPN Server or Gateway in order to route network traffic. Example uses might be a Site-to-Site VPN where the remote site (client) connects to the central office (server), or when securing the traffic of another host, such as a Turnkey Linux Torrent Server.
In either case, you will need to first set up your client.ovpn file as your OpenVPN default configuration file. You do this by copying the client.ovpn file to a .conf file in /etc/openvpn:
cp /root/client.ovpn /etc/openvpn/client.conf
Then you want to make sure that the OpenVPN server starts successfully by:
openvpn --config /etc/openvpn/client.conf
Now you need to make sure that OpenVPN starts your client connection when the server boots by editing the OpenVPN configuration file and uncommenting the "client" autostart entry:
nano /etc/default/openvpn
AUTOSTART="client"
Note that the "AUTOSTART" value must match the name of the /etc/openvpn.conf file, without the ".conf" at the end. If your .ovpn file had a different name, like "user1.conf" you will have to change the value of AUTOSTART="user1"
Finally, you need to enable routing between the eth0 and the tun0 interface using IPTables:
iptables -A FORWARD -o tun0 -i eth0 -s 192.168.1.0/24 -m conntrack --ctstate NEW -j ACCEPT
iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
iptables -A POSTROUTING -t nat -j MASQUERADE
Note that you will need to replace "192.168.1.0/24" with the IP and subnet of your local network.
At this point, you should be able to test your routing with another computer. You will need to set an IP address with a the default gateway that is the static IP address of your Turnkey Linux OpenVPN server. You can then access a website that will display your IP to you to make sure that your IP matches that of your VPN server rather than that of your ISP.
Once your IPTables rules are working and your traffic is routing, you need to save the rules to a specific file:
iptables-save | tee /etc/iptables.up.rules
The file name and path are important because the IPTables rules file already exists and is called when networking starts in /etc/network/interfaces, so don't change the name.
Other places to get (non TKL specific) OpenVPN info:
- Debian Wiki (TKL v14 is built on Debian Jessie)
- Official OpenVPN docs (note: the Jessie version is 2.3.4)


