source: postlfs/security/stunnel.xml@ bfb7882

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 bfb7882 was 823b1a3, checked in by Randy McMurchy <randy@…>, 19 years ago

Tagging fixes to various package instructions

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

  • Property mode set to 100644
File size: 10.5 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 <systemitem class='username'>root</systemitem> has read and
102 write access), otherwise you will be
103 prompted to create one during the installation process. The
104 <filename>.pem</filename> file must be formatted as shown below:</para>
105
106<screen><literal>-----BEGIN RSA PRIVATE KEY-----
107<replaceable>[many encrypted lines of unencrypted key]</replaceable>
108-----END RSA PRIVATE KEY-----
109-----BEGIN CERTIFICATE-----
110<replaceable>[many encrypted lines of certificate]</replaceable>
111-----END CERTIFICATE-----
112-----BEGIN DH PARAMETERS-----
113<replaceable>[multiple encrypted lines of DH parameters]</replaceable>
114-----END DH PARAMETERS-----</literal></screen>
115 </note>
116
117 <para>Install <application>Stunnel</application> by running the following
118 commands:</para>
119
120<screen><userinput>./configure --prefix=/usr --sysconfdir=/etc \
121 --localstatedir=/var/lib &amp;&amp;
122make</userinput></screen>
123
124 <para>This package does not come with a test suite.</para>
125
126 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
127
128<screen role="root"><userinput>make install</userinput></screen>
129
130 </sect2>
131
132 <sect2 role="commands">
133 <title>Command Explanations</title>
134
135 <para><parameter>--sysconfdir=/etc</parameter>: This parameter forces
136 the configuration directory to <filename class='directory'>/etc</filename>
137 instead of <filename class='directory'>/usr/etc</filename>.</para>
138
139 <para><parameter>--localstatedir=/var/lib</parameter>: This parameter
140 causes the installation process to create
141 <filename class='directory'>/var/lib/stunnel</filename> instead of
142 <filename class='directory'>/usr/var/stunnel</filename>.</para>
143
144 <para><command>make install</command>: This command installs the package
145 and, if you did not copy an <filename>stunnel.pem</filename> file to the
146 <filename class='directory'>/etc/stunnel</filename> directory, prompts you
147 for the necessary information to create one. Ensure you reply to the</para>
148
149<screen><prompt>Common Name (FQDN of your server) [localhost]:</prompt></screen>
150
151 <para>prompt with the name or IP address you will be using
152 to access the service(s).</para>
153
154 </sect2>
155
156 <sect2 role="configuration">
157 <title>Configuring Stunnel</title>
158
159 <sect3 id="stunnel-config">
160 <title>Config Files</title>
161
162 <para><filename>/etc/stunnel/stunnel.conf</filename></para>
163
164 <indexterm zone="stunnel stunnel-config">
165 <primary sortas="e-etc-stunnel-stunnel.conf">/etc/stunnel/stunnel.conf</primary>
166 </indexterm>
167
168 </sect3>
169
170 <sect3>
171 <title>Configuration Information</title>
172
173 <para>Create a basic <filename>/etc/stunnel/stunnel.conf</filename>
174 configuration file using the following commands:</para>
175
176<screen role="root"><userinput>cat &gt;/etc/stunnel/stunnel.conf &lt;&lt; "EOF"
177<literal># File: /etc/stunnel/stunnel.conf
178
179pid = /run/stunnel.pid
180chroot = /var/lib/stunnel
181client = no
182setuid = stunnel
183setgid = stunnel</literal>
184
185EOF</userinput></screen>
186
187 <para>Next, you need to add the service(s) you wish to encrypt to the
188 configuration file. The format is as follows:</para>
189
190<screen><literal>[<replaceable>[service]</replaceable>]
191accept = <replaceable>[hostname:portnumber]</replaceable>
192connect = <replaceable>[hostname:portnumber]</replaceable></literal></screen>
193
194 <para>If you use <application>Stunnel</application> to encrypt a daemon
195 started from <command>[x]inetd</command>, you may need to disable that
196 daemon in the <filename>/etc/[x]inetd.conf</filename> file and enable a
197 corresponding <replaceable>[service]</replaceable>_stunnel service. You
198 may have to add an appropriate entry in <filename>/etc/services</filename>
199 as well.</para>
200
201 <para>For a full explanation of the commands and syntax used in the
202 configuration file, run <command>man stunnel</command>. To see a
203 BLFS example of an actual setup of an <command>stunnel</command> encrypted
204 service, read the <xref linkend="samba3-swat-config"/> in the
205 <application>Samba</application> instructions.</para>
206
207 </sect3>
208
209 <sect3 id="stunnel-init">
210 <title>Boot Script</title>
211
212 <para>To automatically start the <command>stunnel</command> daemon
213 when the system is rebooted, install the
214 <filename>/etc/rc.d/init.d/stunnel</filename> bootscript from the
215 <xref linkend="intro-important-bootscripts"/> package.</para>
216
217 <indexterm zone="stunnel stunnel-init">
218 <primary sortas="f-stunnel">stunnel</primary>
219 </indexterm>
220
221<screen role="root"><userinput>make install-stunnel</userinput></screen>
222
223 </sect3>
224
225 </sect2>
226
227 <sect2 role="content">
228 <title>Contents</title>
229
230 <segmentedlist>
231 <segtitle>Installed Programs</segtitle>
232 <segtitle>Installed Library</segtitle>
233 <segtitle>Installed Directories</segtitle>
234
235 <seglistitem>
236 <seg>stunnel and stunnel3</seg>
237 <seg>libstunnel.so</seg>
238 <seg>/etc/stunnel, /var/lib/stunnel, and /usr/share/doc/stunnel</seg>
239 </seglistitem>
240 </segmentedlist>
241
242 <variablelist>
243 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
244 <?dbfo list-presentation="list"?>
245 <?dbhtml list-presentation="table"?>
246
247 <varlistentry id="stunnel-prog">
248 <term><command>stunnel</command></term>
249 <listitem>
250 <para> is a program designed to work as an SSL
251 encryption wrapper between remote clients and local
252 (<command>[x]inetd</command>-startable) or remote servers.</para>
253 <indexterm zone="stunnel stunnel-prog">
254 <primary sortas="b-stunnel">stunnel</primary>
255 </indexterm>
256 </listitem>
257 </varlistentry>
258
259 <varlistentry id="stunnel3">
260 <term><command>stunnel3</command></term>
261 <listitem>
262 <para>is a <application>Perl</application> wrapper script to use
263 <command>stunnel</command> 3.x syntax with <command>stunnel</command>
264 >=4.05.</para>
265 <indexterm zone="stunnel stunnel3">
266 <primary sortas="b-stunnel3">stunnel3</primary>
267 </indexterm>
268 </listitem>
269 </varlistentry>
270
271 <varlistentry id="libstunnel">
272 <term><filename class='libraryfile'>libstunnel.so</filename></term>
273 <listitem>
274 <para> contains the API functions required by
275 <application>Stunnel</application>.</para>
276 <indexterm zone="stunnel libstunnel">
277 <primary sortas="c-libstunnel">libstunnel.so</primary>
278 </indexterm>
279 </listitem>
280 </varlistentry>
281
282 </variablelist>
283
284 </sect2>
285
286</sect1>
Note: See TracBrowser for help on using the repository browser.