

Setting this to no disables this feature. In this mode, stunnel will validate that the connection meets the Federal Information Processing Standard. fips: Enables or disables stunnel’s FIPS 140-2 mode.The first five lines in the file are global options, meaning they will apply to every service you include in this file: It will be set to 0 by default, but change this to 1 to enable stunnel to start at boot:Ĭonnect = managed_redis_hostname_or_ip: managed_redis_port Here, we’ll use nano:įind the ENABLED option near the top of the file. Open this file with your preferred text editor. You’ll need to modify the /etc/default/stunnel4 file to enable this init script. However, stunnel uses a SysV-style init script, which is based on the older UNIX System V init system, for startup. Modern Linux systems rely on systemd for initializing and managing services and daemons. This tells us that stunnel is running, but it isn’t able to actually do anything since we haven’t yet configured it. Here, you can see that the stunnel service is active, though the process immediately exited. Sep 12 14:34:05 stunnel systemd: Started LSB: Start or stop stunnel 4.x (TLS tunnel for network daemons). Sep 12 14:34:05 stunnel stunnel4: TLS tunnels disabled, see /etc/default/stunnel4 Sep 12 14:34:05 stunnel systemd: Starting LSB: Start or stop stunnel 4.x (TLS tunnel for network daemons). Loaded: loaded (/etc/init.d/stunnel4 generated)Īctive: active (exited) since Thu 14:34:05 UTC 8s ago rvice - LSB: Start or stop stunnel 4.x (TLS tunnel for network daemons).You can check whether stunnel was installed correctly and its systemd service is working by running the following command:
#Stunnel http server install#
When prompted, press ENTER to confirm that you want to install the packages. Then install the redis-tools and stunnel4 packages with APT:
#Stunnel http server update#
You can also install stunnel from the default Ubuntu repositories by downloading the stunnel4 package.įirst, update your server’s package index if you’ve not done so recently: However, you can install redis-cli without the Redis server by installing the redis-tools package from the default Ubuntu repositories. When you install a Redis server, it usually comes packaged with redis-cli. Step 1 - Installing Stunnel and redis-cli To provision a DigitalOcean Managed Redis Database, follow our Managed Redis product documentation. The steps outlined in this tutorial were tested on a DigitalOcean Managed Redis Database, though they should generally work for managed databases from any cloud provider. To set this up, follow our initial server setup guide for Ubuntu 18.04.

This server should have a non-root user with administrative privileges and a firewall configured with ufw. In this guide, we will walk through installing and configuring stunnel so you can connect to a managed Redis instance over TLS with redis-cli. Stunnel is an open-source proxy used to create secure tunnels, allowing you to communicate with other machines over TLS. One way to establish a secure connection to a managed Redis instance is to create a tunnel that uses the TLS protocol. This means that without further configuration, redis-cli is not a secure way to connect to a remote Redis server. Redis-cli, the Redis command line interface, doesn’t natively support connections over TLS, a cryptographic protocol that allows for secure communications over a network. However, any time you make a connection to a remote database server, you run the risk of malicious actors sniffing the sensitive information you send to it. A managed Redis instance can provide benefits like high availability and automated updates.
