|
| 1 | +# stunnel Module # |
| 2 | + |
| 3 | +# Usage # |
| 4 | + |
| 5 | +This module initially intended for use with xinetd. While these examples make |
| 6 | +use of arusso-xinetd, it is not a requirement, hence the lack of the explicit |
| 7 | +dependency in the ModuleFile. |
| 8 | + |
| 9 | +## Examples ## |
| 10 | + |
| 11 | +Setup an stunnel for 0.0.0.0:993 to localhost:994. Because stunnel wants a cert |
| 12 | +file with the private key, and intermediate and signed cert in a single file, we |
| 13 | +have the stunnel::cert type to combine the certs together for you. Certs are |
| 14 | +combined in the order they appear in the array. Certs are stored in |
| 15 | +/etc/stunnel/certs/ by default, and have permissions 600 and owned by root. |
| 16 | + |
| 17 | + include stunnel |
| 18 | + $imaps_service = { |
| 19 | + 'accept' => '0.0.0.0:993', |
| 20 | + 'connect' => '127.0.0.1:994', |
| 21 | + } |
| 22 | + stunnel::tun { 'imaps': |
| 23 | + services => { 'imaps' => $imaps_service }, |
| 24 | + options => 'NO_SSLv2', |
| 25 | + } |
| 26 | + |
| 27 | + stunnel::cert { 'imaps': |
| 28 | + components => [ '/etc/pki/tls/certs/public-cert.crt', '/etc/pki/tls/private/private.key' ], |
| 29 | + } |
| 30 | + |
| 31 | + include xinetd |
| 32 | + xinetd_imaps = { |
| 33 | + 'disable' => 'no', |
| 34 | + 'type' => 'unlisted', |
| 35 | + 'port' => '993', |
| 36 | + 'socket_type' => 'stream', |
| 37 | + 'wait' => 'no', |
| 38 | + 'user' => 'root', |
| 39 | + 'protocol' => 'tcp', |
| 40 | + 'server' => '/usr/bin/stunnel', |
| 41 | + 'server_args' => '/etc/stunnel/conf.d/imaps.conf', |
| 42 | + } |
| 43 | + xinetd::service_entry { 'stunnel-imaps': |
| 44 | + ensure => 'present', |
| 45 | + options => $xinetd_imaps, |
| 46 | + } |
| 47 | + |
| 48 | +License |
| 49 | +------- |
| 50 | + |
| 51 | +See LICENSE file |
| 52 | + |
| 53 | +Copyright |
| 54 | +--------- |
| 55 | + |
| 56 | +Copyright © 2013 The Regents of the University of California |
| 57 | + |
| 58 | + |
| 59 | +Contact |
| 60 | +------- |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | +Support |
| 65 | +------- |
| 66 | + |
| 67 | +Please log tickets and issues at the |
| 68 | +[Projects site](https://github.com/arusso/puppet-stunnel/issues/) |
0 commit comments