I'm running OTRS on a CentOS server and the MySQL DB is running on a remote server, on CentOS as well. OTRS does not support an encrypted connection with MySQL hence the connection is not encrypted. I would like to use stunnel to encrypt the connection but I fail to configure it. MySQL is using the default port 3306.
OTRS = 10.0.0.4 MySQL = 10.0.0.3
#Sample stunnel configuration on OTRS Server #Provide the full path to your certificate-key pair file cert = /etc/pki/tls/certs/stunnel.pem #lock the process into a chroot jail chroot = /var/run/stunnel # and create the PID file in this jail pid = /stunnel.pid #change the UID and GID of the process for security reasons setuid = nobody setgid = nobody #enable client mode client = yes socket = l:TCP_NODELAY=1 #socket = r:TCP:NODELAY=1 [mysqls] accept = 0.0.0.0:3306 connect = 10.0.0.3:3307
And the config file on the database server:
#Sample configuration file for MySQL #Provide the full path to your certificate-key pair file cert = /etc/pki/tls/certs/stunnel.pem #Allow only TLS, thus avoiding SSL sslVersion = TLSv1 #lock the process into a chroot jail chroot = /var/run/stunnel #change the UID and GID of the process for security reasons setuid = nobody setgid = nobody pid = /stunnel.pid socket = l:TCP_NODELAY=1 socket = r:TCP_NODELAY=1 #Configure our secured MySQL Server [mysqls] accept = 3307 connect = 3306
I guess that the part in the stunnel config file on the OTRS Server is wrong. Any ideas?
accept = 0.0.0.0:3306