stunnel
Universal TLS/SSL tunneling proxy
TLDR
Start stunnel with a configuration file
SYNOPSIS
stunnel [configfile] | -fd n | -help | -version | -sockets | -options
DESCRIPTION
stunnel is a TLS/SSL proxy that wraps arbitrary TCP connections with encryption. It adds TLS functionality to existing services without modifying application code.
In server mode, stunnel accepts encrypted connections and forwards them unencrypted to a backend service. In client mode, it accepts unencrypted connections and establishes TLS tunnels to remote servers.
The proxy uses OpenSSL for cryptography and supports modern TLS versions. It can run as a daemon or be launched by inetd/systemd for on-demand connections.
PARAMETERS
configfile
Path to configuration file-fd n
Read configuration from file descriptor n-help
Display help message-version
Display version information-sockets
Show available socket options-options
Show available TLS/SSL options
CONFIGURATION
Key configuration directives:
accept
Accept connections on specified host:portconnect
Connect to specified host:portcert
Path to certificate filekey
Path to private key fileclient
Set to "yes" for client modeexec
Execute local program instead of connecting
CAVEATS
SSLv2 and SSLv3 are disabled by default due to security vulnerabilities. Certificate verification should be enabled in production. Transparent proxy mode requires specific kernel support.
HISTORY
stunnel was created by MichaĆ Trojnara in 1998 as a universal TLS wrapper. It became widely used for adding SSL to legacy protocols and continues active development, supporting modern TLS standards.
