source: postlfs/security/stunnel.xml@ 708f97e9

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 708f97e9 was 708f97e9, checked in by Randy McMurchy <randy@…>, 18 years ago

Updated to Stunnel-4.14

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@5435 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 10.7 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!-- <!ENTITY stunnel-download-http "http://www.stunnel.org/download/stunnel/src/stunnel-&stunnel-version;.tar.gz"> -->
8 <!ENTITY stunnel-download-http "http://www.stunnel.org/download/stunnel/src/stunnel-&stunnel-version;.tar.gz">
9 <!ENTITY stunnel-download-ftp "ftp://stunnel.mirt.net/stunnel/stunnel-&stunnel-version;.tar.gz">
10 <!ENTITY stunnel-md5sum "0969cc4868dfd75f22792ecccc9ec555">
11 <!ENTITY stunnel-size "488 KB">
12 <!ENTITY stunnel-buildsize "4.0 MB">
13 <!ENTITY stunnel-time "0.1 SBU">
14]>
15
16<sect1 id="stunnel" xreflabel="Stunnel-&stunnel-version;">
17 <?dbhtml filename="stunnel.html"?>
18
19 <sect1info>
20 <othername>$LastChangedBy$</othername>
21 <date>$Date$</date>
22 <keywordset>
23 <keyword role="package">stunnel-&stunnel-version;.tar</keyword>
24 <keyword role="ftpdir">stunnel</keyword>
25 </keywordset>
26 </sect1info>
27
28 <title>Stunnel-&stunnel-version;</title>
29
30 <indexterm zone="stunnel">
31 <primary sortas="a-Stunnel">Stunnel</primary>
32 </indexterm>
33
34 <sect2 role="package">
35 <title>Introduction to Stunnel</title>
36
37 <para>The <application>Stunnel</application> package contains a program
38 that allows you to encrypt arbitrary TCP connections inside SSL (Secure
39 Sockets Layer) so you can easily communicate with clients over secure
40 channels. <application>Stunnel</application> can be used to add SSL
41 functionality to commonly used <application>Inetd</application> daemons
42 like POP-2, POP-3, and IMAP servers, to standalone daemons like NNTP,
43 SMTP and HTTP, and in tunneling PPP over network sockets without changes
44 to the server package source code.</para>
45
46 <bridgehead renderas="sect3">Package Information</bridgehead>
47 <itemizedlist spacing="compact">
48 <listitem>
49 <para>Download (HTTP): <ulink url="&stunnel-download-http;"/></para>
50 </listitem>
51 <listitem>
52 <para>Download (FTP): <ulink url="&stunnel-download-ftp;"/></para>
53 </listitem>
54 <listitem>
55 <para>Download MD5 sum: &stunnel-md5sum;</para>
56 </listitem>
57 <listitem>
58 <para>Download size: &stunnel-size;</para>
59 </listitem>
60 <listitem>
61 <para>Estimated disk space required: &stunnel-buildsize;</para>
62 </listitem>
63 <listitem>
64 <para>Estimated build time: &stunnel-time;</para>
65 </listitem>
66 </itemizedlist>
67
68 <bridgehead renderas="sect3">Stunnel Dependencies</bridgehead>
69
70 <bridgehead renderas="sect4">Required</bridgehead>
71 <para role="required"><xref linkend="openssl"/></para>
72
73 <bridgehead renderas="sect4">Optional</bridgehead>
74 <para role="optional"><xref linkend="tcpwrappers"/></para>
75
76 </sect2>
77
78 <sect2 role="installation">
79 <title>Installation of Stunnel</title>
80
81 <para>The <command>stunnel</command> daemon will be run in a
82 <command>chroot</command> jail by an unprivileged user. Create the
83 new user, group and <command>chroot</command> home directory structure
84 using the following commands as the
85 <systemitem class="username">root</systemitem> user:</para>
86
87<screen role="root"><userinput>groupadd -g 51 stunnel &amp;&amp;
88useradd -c "Stunnel Daemon" -d /var/lib/stunnel \
89 -g stunnel -s /bin/false -u 51 stunnel &amp;&amp;
90install -v -m700 -o stunnel -g stunnel -d /var/lib/stunnel/run</userinput></screen>
91
92 <note>
93 <para>A signed SSL Certificate and a Private Key is necessary to run
94 the <command>stunnel</command> daemon. If you own, or have already
95 created a signed SSL Certificate you wish to use, copy it to
96 <filename>/etc/stunnel/stunnel.pem</filename> before starting the build
97 (ensure only <systemitem class='username'>root</systemitem> has read and
98 write access), otherwise you will be
99 prompted to create one during the installation process. The
100 <filename class='extension'>.pem</filename> file must be formatted as
101 shown below:</para>
102
103<screen><literal>-----BEGIN RSA PRIVATE KEY-----
104<replaceable>[many encrypted lines of unencrypted key]</replaceable>
105-----END RSA PRIVATE KEY-----
106-----BEGIN CERTIFICATE-----
107<replaceable>[many encrypted lines of certificate]</replaceable>
108-----END CERTIFICATE-----
109-----BEGIN DH PARAMETERS-----
110<replaceable>[multiple encrypted lines of DH parameters]</replaceable>
111-----END DH PARAMETERS-----</literal></screen>
112 </note>
113
114 <para>Install <application>Stunnel</application> by running the following
115 commands:</para>
116
117<screen><userinput>./configure --prefix=/usr --sysconfdir=/etc \
118 --localstatedir=/var/lib --disable-libwrap &amp;&amp;
119make</userinput></screen>
120
121 <para>This package does not come with a test suite.</para>
122
123 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
124
125<screen role="root"><userinput>make install</userinput></screen>
126
127 </sect2>
128
129 <sect2 role="commands">
130 <title>Command Explanations</title>
131
132 <para><parameter>--sysconfdir=/etc</parameter>: This parameter forces
133 the configuration directory to <filename class='directory'>/etc</filename>
134 instead of <filename class='directory'>/usr/etc</filename>.</para>
135
136 <para><parameter>--localstatedir=/var/lib</parameter>: This parameter
137 causes the installation process to create
138 <filename class='directory'>/var/lib/stunnel</filename> instead of
139 <filename class='directory'>/usr/var/stunnel</filename>.</para>
140
141 <para><parameter>--disable-libwrap</parameter>: This parameter is required
142 if you don't have <application>tcpwrappers</application> installed. Remove
143 the parameter if <application>tcpwrappers</application> is installed.</para>
144
145 <para><command>make install</command>: This command installs the package
146 and, if you did not copy an <filename>stunnel.pem</filename> file to the
147 <filename class='directory'>/etc/stunnel</filename> directory, prompts you
148 for the necessary information to create one. Ensure you reply to the</para>
149
150<screen><prompt>Common Name (FQDN of your server) [localhost]:</prompt></screen>
151
152 <para>prompt with the name or IP address you will be using
153 to access the service(s).</para>
154
155 </sect2>
156
157 <sect2 role="configuration">
158 <title>Configuring Stunnel</title>
159
160 <sect3 id="stunnel-config">
161 <title>Config Files</title>
162
163 <para><filename>/etc/stunnel/stunnel.conf</filename></para>
164
165 <indexterm zone="stunnel stunnel-config">
166 <primary sortas="e-etc-stunnel-stunnel.conf">/etc/stunnel/stunnel.conf</primary>
167 </indexterm>
168
169 </sect3>
170
171 <sect3>
172 <title>Configuration Information</title>
173
174 <para>Create a basic <filename>/etc/stunnel/stunnel.conf</filename>
175 configuration file using the following commands:</para>
176
177<screen role="root"><userinput>cat &gt;/etc/stunnel/stunnel.conf &lt;&lt; "EOF" &amp;&amp;
178<literal># File: /etc/stunnel/stunnel.conf
179
180pid = /run/stunnel.pid
181chroot = /var/lib/stunnel
182client = no
183setuid = stunnel
184setgid = stunnel</literal>
185
186EOF
187chmod -v 644 /etc/stunnel/stunnel.conf</userinput></screen>
188
189 <para>Next, you need to add the service(s) you wish to encrypt to the
190 configuration file. The format is as follows:</para>
191
192<screen><literal>[<replaceable>[service]</replaceable>]
193accept = <replaceable>[hostname:portnumber]</replaceable>
194connect = <replaceable>[hostname:portnumber]</replaceable></literal></screen>
195
196 <para>If you use <application>Stunnel</application> to encrypt a daemon
197 started from <command>[x]inetd</command>, you may need to disable that
198 daemon in the <filename>/etc/[x]inetd.conf</filename> file and enable a
199 corresponding <replaceable>[service]</replaceable>_stunnel service. You
200 may have to add an appropriate entry in <filename>/etc/services</filename>
201 as well.</para>
202
203 <para>For a full explanation of the commands and syntax used in the
204 configuration file, run <command>man stunnel</command>. To see a
205 BLFS example of an actual setup of an <command>stunnel</command> encrypted
206 service, read the <xref linkend="samba3-swat-config"/> in the
207 <application>Samba</application> instructions.</para>
208
209 </sect3>
210
211 <sect3 id="stunnel-init">
212 <title>Boot Script</title>
213
214 <para>To automatically start the <command>stunnel</command> daemon
215 when the system is rebooted, install the
216 <filename>/etc/rc.d/init.d/stunnel</filename> bootscript from the
217 <xref linkend="intro-important-bootscripts"/> package.</para>
218
219 <indexterm zone="stunnel stunnel-init">
220 <primary sortas="f-stunnel">stunnel</primary>
221 </indexterm>
222
223<screen role="root"><userinput>make install-stunnel</userinput></screen>
224
225 </sect3>
226
227 </sect2>
228
229 <sect2 role="content">
230 <title>Contents</title>
231
232 <segmentedlist>
233 <segtitle>Installed Programs</segtitle>
234 <segtitle>Installed Library</segtitle>
235 <segtitle>Installed Directories</segtitle>
236
237 <seglistitem>
238 <seg>stunnel and stunnel3</seg>
239 <seg>libstunnel.so</seg>
240 <seg>/etc/stunnel, /var/lib/stunnel, and /usr/share/doc/stunnel</seg>
241 </seglistitem>
242 </segmentedlist>
243
244 <variablelist>
245 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
246 <?dbfo list-presentation="list"?>
247 <?dbhtml list-presentation="table"?>
248
249 <varlistentry id="stunnel-prog">
250 <term><command>stunnel</command></term>
251 <listitem>
252 <para> is a program designed to work as an SSL
253 encryption wrapper between remote clients and local
254 (<command>[x]inetd</command>-startable) or remote servers.</para>
255 <indexterm zone="stunnel stunnel-prog">
256 <primary sortas="b-stunnel">stunnel</primary>
257 </indexterm>
258 </listitem>
259 </varlistentry>
260
261 <varlistentry id="stunnel3">
262 <term><command>stunnel3</command></term>
263 <listitem>
264 <para>is a <application>Perl</application> wrapper script to use
265 <command>stunnel</command> 3.x syntax with <command>stunnel</command>
266 >=4.05.</para>
267 <indexterm zone="stunnel stunnel3">
268 <primary sortas="b-stunnel3">stunnel3</primary>
269 </indexterm>
270 </listitem>
271 </varlistentry>
272
273 <varlistentry id="libstunnel">
274 <term><filename class='libraryfile'>libstunnel.so</filename></term>
275 <listitem>
276 <para> contains the API functions required by
277 <application>Stunnel</application>.</para>
278 <indexterm zone="stunnel libstunnel">
279 <primary sortas="c-libstunnel">libstunnel.so</primary>
280 </indexterm>
281 </listitem>
282 </varlistentry>
283
284 </variablelist>
285
286 </sect2>
287
288</sect1>
Note: See TracBrowser for help on using the repository browser.