Skip to content

Instantly share code, notes, and snippets.

@mbenedettini
Last active December 19, 2015 06:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mbenedettini/5911415 to your computer and use it in GitHub Desktop.
Save mbenedettini/5911415 to your computer and use it in GitHub Desktop.
Simple /etc/stunnel/stunnel.conf
; Certificate/key is needed in server mode and optional in client mode
; To generate a self-signed certificate run:
; openssl req -new -x509 -days 365 -nodes -config /usr/share/doc/stunnel4/examples/stunnel.cnf -out stunnel.pem -keyout stunnel.pem
cert = /etc/stunnel/ssl/stunnel.pem
; Protocol version (all, SSLv2, SSLv3, TLSv1)
sslVersion = SSLv3
; Some security enhancements for UNIX systems - comment them out on Win32
chroot = /var/lib/stunnel4/
setuid = stunnel4
setgid = stunnel4
; pid file
pid = /stunnel.pid
compression = zlib
; Some performance tunings
socket = l:TCP_NODELAY=1
socket = r:TCP_NODELAY=1
; Logging
output = /var/log/stunnel4/stunnel.log
[myservice]
accept = 443
; To forward connections to another host use anotherhost:80 (or any other port than 80)
connect = 80
TIMEOUTclose = 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment