2017-11-15 15:03:25 +01:00
|
|
|
; Sample stunnel configuration file for Win32 by Michal Trojnara 2002-2017
|
2017-03-28 09:58:13 +02:00
|
|
|
; Some options used here may be inadequate for your particular configuration
|
|
|
|
; This sample file does *not* represent stunnel.conf defaults
|
|
|
|
; Please consult the manual for detailed description of available options
|
|
|
|
|
|
|
|
; **************************************************************************
|
|
|
|
; * Global options *
|
|
|
|
; **************************************************************************
|
|
|
|
|
2017-11-15 15:03:25 +01:00
|
|
|
; Debugging stuff (may be useful for troubleshooting)
|
|
|
|
;debug = info
|
2017-03-28 09:58:13 +02:00
|
|
|
;output = stunnel.log
|
|
|
|
|
2017-11-15 15:03:25 +01:00
|
|
|
; Enable FIPS 140-2 mode if needed for compliance
|
|
|
|
;fips = yes
|
|
|
|
|
|
|
|
; Microsoft CryptoAPI engine allows for authentication with private keys
|
|
|
|
; stored in the Windows certificate store
|
|
|
|
; Each section using this feature also needs the "engineId = capi" option
|
|
|
|
;engine = capi
|
|
|
|
|
|
|
|
; The pkcs11 engine allows for authentication with cryptographic
|
|
|
|
; keys isolated in a hardware or software token
|
|
|
|
; MODULE_PATH specifies the path to the pkcs11 module shared library,
|
|
|
|
; e.g. softhsm2.dll or opensc-pkcs11.so
|
|
|
|
; Each section using this feature also needs the "engineId = pkcs11" option
|
|
|
|
;engine = pkcs11
|
|
|
|
;engineCtrl = MODULE_PATH:softhsm2.dll
|
|
|
|
;engineCtrl = PIN:1234
|
2017-03-28 09:58:13 +02:00
|
|
|
|
|
|
|
; **************************************************************************
|
|
|
|
; * Service defaults may also be specified in individual service sections *
|
|
|
|
; **************************************************************************
|
|
|
|
|
2017-11-15 15:03:25 +01:00
|
|
|
; Enable support for the insecure SSLv3 protocol
|
|
|
|
;options = -NO_SSLv3
|
2017-03-28 09:58:13 +02:00
|
|
|
|
|
|
|
; These options provide additional security at some performance degradation
|
|
|
|
;options = SINGLE_ECDH_USE
|
|
|
|
;options = SINGLE_DH_USE
|
|
|
|
|
|
|
|
; **************************************************************************
|
2017-11-15 15:03:25 +01:00
|
|
|
; * Include all configuration file fragments from the specified folder *
|
2017-03-28 09:58:13 +02:00
|
|
|
; **************************************************************************
|
|
|
|
|
2017-11-15 15:03:25 +01:00
|
|
|
;include = conf.d
|
2017-03-28 09:58:13 +02:00
|
|
|
|
2017-11-15 15:03:25 +01:00
|
|
|
; **************************************************************************
|
|
|
|
; * Service definitions (at least one service has to be defined) *
|
|
|
|
; **************************************************************************
|
2017-03-28 09:58:13 +02:00
|
|
|
|
2017-11-15 15:03:25 +01:00
|
|
|
; ***************************************** Example TLS client mode services
|
|
|
|
|
|
|
|
[gmail-pop3]
|
|
|
|
client = yes
|
|
|
|
accept = 127.0.0.1:110
|
|
|
|
connect = pop.gmail.com:995
|
|
|
|
verifyChain = yes
|
|
|
|
CAfile = ca-certs.pem
|
|
|
|
checkHost = pop.gmail.com
|
|
|
|
OCSPaia = yes
|
|
|
|
|
|
|
|
[gmail-imap]
|
|
|
|
client = yes
|
|
|
|
accept = 127.0.0.1:143
|
|
|
|
connect = imap.gmail.com:993
|
|
|
|
verifyChain = yes
|
|
|
|
CAfile = ca-certs.pem
|
|
|
|
checkHost = imap.gmail.com
|
|
|
|
OCSPaia = yes
|
|
|
|
|
|
|
|
[gmail-smtp]
|
|
|
|
client = yes
|
|
|
|
accept = 127.0.0.1:25
|
|
|
|
connect = smtp.gmail.com:465
|
|
|
|
verifyChain = yes
|
|
|
|
CAfile = ca-certs.pem
|
|
|
|
checkHost = smtp.gmail.com
|
|
|
|
OCSPaia = yes
|
|
|
|
|
|
|
|
; Encrypted HTTP proxy authenticated with a client certificate
|
|
|
|
; located in the Windows certificate store
|
|
|
|
;[example-proxy]
|
2017-03-28 09:58:13 +02:00
|
|
|
;client = yes
|
2017-11-15 15:03:25 +01:00
|
|
|
;accept = 127.0.0.1:8080
|
|
|
|
;connect = example.com:8443
|
|
|
|
;engineId = capi
|
2017-03-28 09:58:13 +02:00
|
|
|
|
2017-11-15 15:03:25 +01:00
|
|
|
; Encrypted HTTP proxy authenticated with a client certificate
|
|
|
|
; located in a cryptographic token
|
|
|
|
;[example-pkcs11]
|
2017-03-28 09:58:13 +02:00
|
|
|
;client = yes
|
2017-11-15 15:03:25 +01:00
|
|
|
;accept = 127.0.0.1:8080
|
|
|
|
;connect = example.com:8443
|
|
|
|
;engineId = pkcs11
|
|
|
|
;cert = pkcs11:token=MyToken;object=MyCert
|
|
|
|
;key = pkcs11:token=MyToken;object=MyKey
|
|
|
|
|
|
|
|
; ***************************************** Example TLS server mode services
|
|
|
|
|
|
|
|
;[pop3s]
|
|
|
|
;accept = 995
|
|
|
|
;connect = 110
|
|
|
|
;cert = stunnel.pem
|
|
|
|
|
|
|
|
;[imaps]
|
|
|
|
;accept = 993
|
|
|
|
;connect = 143
|
|
|
|
;cert = stunnel.pem
|
|
|
|
|
|
|
|
;[ssmtp]
|
|
|
|
;accept = 465
|
|
|
|
;connect = 25
|
|
|
|
;cert = stunnel.pem
|
|
|
|
|
|
|
|
; TLS front-end to a web server
|
2017-03-28 09:58:13 +02:00
|
|
|
;[https]
|
|
|
|
;accept = 443
|
|
|
|
;connect = 80
|
2017-11-15 15:03:25 +01:00
|
|
|
;cert = stunnel.pem
|
|
|
|
; "TIMEOUTclose = 0" is a workaround for a design flaw in Microsoft SChannel
|
|
|
|
; Microsoft implementations do not use TLS close-notify alert and thus they
|
|
|
|
; are vulnerable to truncation attacks
|
2017-03-28 09:58:13 +02:00
|
|
|
;TIMEOUTclose = 0
|
|
|
|
|
2017-11-15 15:03:25 +01:00
|
|
|
; Remote cmd.exe protected with PSK-authenticated TLS
|
|
|
|
; Create "secrets.txt" containing IDENTITY:KEY pairs
|
|
|
|
;[cmd]
|
|
|
|
;accept = 1337
|
|
|
|
;exec = c:\windows\system32\cmd.exe
|
|
|
|
;execArgs = cmd.exe
|
|
|
|
;ciphers = PSK
|
|
|
|
;PSKsecrets = secrets.txt
|
|
|
|
|
2017-03-28 09:58:13 +02:00
|
|
|
; vim:ft=dosini
|