Difference between revisions of "Template:Stunnel"
|Line 17:||Line 17:|
| style="vertical-align:top; font-size:100%; " | Click [https://www.stunnel.org/downloads/stunnel-5.03-installer.exe on this link] to download and install the precompiled Windows binaries version 5.
| style="vertical-align:top; font-size:100%; " | Click [https://www.stunnel.org/downloads/stunnel-5.03-installer.exe on this link] to download and install the precompiled Windows binaries version 5.. Once the binaries have downloaded, install Stunnel using the default options.<br /><br />
Revision as of 18:27, 22 September 2014
| Use SSL Encryption to Secure Your Trac System |
Transport Layer Security (TLS) and Secure Sockets Layer (SSL) are cryptographic protocols that provide secure communications on the Internet. There are slight differences between SSL and TLS, but they essentially provide the same protection. Redrock offers SSL Encryption utilizing a 3rd party application called Stunnel.
| What is Stunnel? |
| Stunnel is a program that encrypts all data connections to your Trac server. Stunnel facilitates this by acting as a proxy between users' browsers and the Trac application. So, a user would open web browser and enter in your server address, i.e. https://trac.go-redrock.com/. Stunnel receives the encrypted request, decrypts the request, and then forwards the request to the Trac application. The Trac application will then issue a response back to Stunnel, Stunnel encrypts the response, and then forwards the encrypted response back to the user's browser. With this method, all network traffic from the server to the client is encrypted while the Trac application communicates with Stunnel in an unencrypted format.|
| Installing Stunnel |
| Click on this link to download and install the precompiled Windows binaries version 5.03. Once the binaries have downloaded, install Stunnel using the default options.|
| Secure Certificate Files |
| The necessary SSL Files are a certificate (typically cert.pem) and a key file (typically key.pem). Redrock Software can provide you with these and an additional file (req.pem) without charge; however, these files are self-signed by Redrock and will produce a warning on your standard web browser. Because Redrock Software Corporation is not a "Trusted" Certificate Authority to the major browser companies, you will always receive the warning with our free SSL Certificate. The req.pem is the equivalent of a Certificate Signing Request (CSR) and is used to obtain your SSL Certificate. You have the option of obtaining your own Apache-compatible certificate from a "Trusted" source, such as VeriSign, DigiCert, Thawte, EnTrust, GeoTrust, and GoDaddy. These are just a few of the options available to you; in all, the mainstream browsers (IE, Firefox, Safari, etc.) only trust about 20 of the major Certificate Authorities (CA).|
If you choose to obtain your own certificate, be sure to retrieve an Apache-compatible certificate so it will work with the SSL Module. Some CA's will provide you with a chained certificate, which we will have to adjoin in order to make the file compatible. Place the certificate and key files in your Stunnel installation directory (C:\Program Files\stunnel). Keep a copy of your req.pem (CSR) file to request your new certificate when it expires.
| Stunnel Config File |
| The Stunnel configuration file (Stunnel.conf) is located in the C:\Program Files\stunnel\ directory. You will need to edit this file to secure your Trac site. Below is a good default config file. Simply replace the contents of Stunnel.conf with this, and edit the IP Address on line 17.|
Sample stunnel configuration file by Redrock Software
| Trac System Prefs.ini File |
| Open the Prefs.ini file in the Trac application folder. Edit the following linse to match the sample values.|
The Trac application is now listening for standard HTTP connections on port 80. Those connections will come from users accessing the Trac application across the network. The Trac application is also listening for standard HTTP connections on port 81. The HTTP connections on port 81 are coming from the Stunnel application, which is listening for HTTPS connections on port 443.
| Force All Connections on Secure Port |
| After the server connections have been tested and confirmed on ports 80 and 443, you can now force all users to connect on the secure port 443. Open the Prefs.ini file in the Trac application folder and make the following change:|
The Trac application now listens for a standard HTTP connection on port 80 and redirects all requests to the address entered in the redirect setting, which should be your secure HTTPS address. Now the connection is on the secure HTTPS port 443 and Stunnel receives the request. Stunnel makes the local HTTP connection to the Trac application on port 81 and responds back to the user's browser on the secure port 443. All network traffic on your Trac system is directed to the secure connection on port 443.
| Configure Stunnel as a Service |
| To set stunnel as a service, run the following command in a Command Prompt window.|
You will receive a prompt informing you that the service was installed. You can now access the Services from your Administrator Tool and start Stunnel as a service.