source: postlfs/security/stunnel.xml@ 50d61ed

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.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 50d61ed was 50d61ed, checked in by Randy McMurchy <randy@…>, 19 years ago

Updated to Stunnel-4.11

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

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