


Now run stunnel on the client side and set your application to use it.Ĭontinuing with the MySQL example, I tell my copy of HeidiSQL to connect to my router on port 3306. The connect command points at the server's IP address and the port where stunnel is listening there. Note that here the client = yes directive is added. When you create the config file for the client side, the tunnel you define will look slightly different: Repeat all of the above steps on the client end (for example, your workstation or your home router) to get stunnel installed there. Client-side installation and configuration
#CONFIGURING STUNNEL INSTALL#
You must install the Datadog Agent on the. That's it for the server-side installation. Use the Datadog - Stunnel proxy integration to monitor potential network issues or DDoS attacks. I just add it to /etc/rc.local: #Run stunnel Once stunnel starts properly, configure it to run automatically when the system boots. If things didn't work, set debug = 7 in the config file and try again. If you have a second poller it would use port 7557 as an example. Please be sure to increment the port used with each poller. Now inspect /var/log/stunnel.log to see if there are any errors. Make sure to edit the stunnel config file on all pollers you wish to Livestatus monitor over stunnel. In the above example, the stunnel server listens on port 3307 for incoming client connections, decrypts the traffic, and forwards the raw data to port 3306 (mysql) on the same server. You need to change ads1:14002 to the IP address or hostname and RSSL port of your ADS machine. Add the following configurations to nf at the end of file The nf file is in the stunnel/config folder. then forwarded to port 3306 on the localhost.ĭefine a different tunnel for each service you want to protect. Download and install The stunnel package can be downloaded from 2. Incoming TLS connections to port 3307 will be decrypted and Next, create a directory for the pidfile to live in: ~]# mkdir /var/run/stunnel & chown nobody /var/run/stunnelĬreate a new file in /etc/stunnel/nf with the following contents, edited as needed for your requirements: stunnel configuration file L6yd5JnK4BK1aoJZiyoO+AVanwQs2BBCGXKEY5YTQJSErwe+vbnNmnQtzMIto2wjĠhkQHbqc4+Q2KTfjJpIhzVO/JL8WS5Ko6LDyEzKh7Se1Gg80wqyjAgECĪppend the resulting DH PARAMETERS block, including the BEGIN and END lines, to the stunnel.pem file you created previously. MIGHAoGBAN1puC8VOxyqydITSDisVIpoFrwLS6yLqwykT/V5I96UPdgWFXwg96Kx
#CONFIGURING STUNNEL GENERATOR#
Generating DH parameters, 2048 bit long safe prime, generator 2ģ2768 bytes (33 kB) copied, 0.00312777 s, 10.5 MB/s certs]# dd if=/dev/urandom count=64 | openssl dhparam -rand - 2048 A 2048-bit group is recommended by the discoverers of the Logjam attack. Now, generate a set of Diffie-Hellman parameters using a 2048-bit group instead of the default 1024-bit size. Next, create a key and a self-signed certificate for stunnel to use: ~]# cd /etc/pki/tls/certs/ & make stunnel.pem Server-side installation and configurationįirst, install stunnel itself on the server: ~]# yum -y install stunnel
#CONFIGURING STUNNEL HOW TO#
Here's how to get stunnel up and running on a CentOS 6 server, and configure your local stunnel client to work with it.
