

- #VPN WITH STUNNEL HOW TO#
- #VPN WITH STUNNEL INSTALL#
- #VPN WITH STUNNEL SOFTWARE#
- #VPN WITH STUNNEL FREE#
Redis server outputActive Internet connections (only servers) Rather than using native systemd methods, to configure the service to start at boot you must modify the /etc/default/stunnel4 file:Įnable the service to start at boot by setting the ENABLED option to “1”: The stunnel service on Ubuntu uses an older SysVinit script for startup, which can be managed by systemd.
#VPN WITH STUNNEL INSTALL#
If you did not need to install anything in the previous section, make sure to include the sudo apt-get update command to refresh your package index before installing: Ubuntu includes version four of the utility, called stunnel4 in its default repositories. Next, you will need to install stunnel on each of the servers and clients. Install and Enable stunnel On Each Computer With the default configuration of the remote Redis server and a firewall active, we can’t currently connect to the remote Redis instance to test.
#VPN WITH STUNNEL SOFTWARE#
All of the software we need is available in the redis-tools package in the default repository: The other Ubuntu 16.04 machine will function as the client. We will try to access this key from our client machine after configuring stunnel. We have set the test key to the value success.
#VPN WITH STUNNEL FREE#
If you already have one or both of these configured, feel free to skip ahead.

Install the Redis Server and Client Packagesīefore we begin, we should have the Redis server installed on one machine and the client packages available on the other. With these characteristics in mind, let’s get started.

What is stunnel?įor basic encrypted communication, the stunnel utility is simple to install and configure. When you are ready to continue, follow along below. You can follow our Ubuntu 16.04 initial server setup guide to fulfill these requirements. Additionally, this guide will assume that you have a basic firewall in place. To get started, you should have a non-root user with sudo privileges configured on each of your machines. We will be using two Ubuntu 16.04 servers to demonstrate. Traffic between Redis clients and servers will be routed through a dedicated SSL encrypted tunnel.
#VPN WITH STUNNEL HOW TO#
In this guide, we will demonstrate how to encrypt Redis traffic using a secure tunneling program called stunnel. If your environment does not match that assumption, you will have to wrap Redis traffic in encryption separately. It operates under the assumption that it has been deployed to an isolated private network, accessible only to trusted parties. Redis does not provide any encryption capabilities of its own. Redis has clients written in most languages with recommended ones featured on their website. It features transactions, a pub/sub messaging pattern, and automatic failover among other functionality. Redis is an open-source key-value data store, using an in-memory storage model with optional disk writes for persistence.
