source: postlfs/security/stunnel.xml@ 5cb3ea7

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.0 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 5cb3ea7 was 2bfe939, checked in by Randy McMurchy <randy@…>, 20 years ago

Updated to Samba-3.0.7

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

  • Property mode set to 100644
File size: 7.0 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
3 "http://www.oasis-open.org/docbook/xml/4.3/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-ftp "ftp://ftp.fu-berlin.de/unix/linux/mirrors/gentoo/distfiles/stunnel-&stunnel-version;.tar.gz">
9 <!ENTITY stunnel-size "341 KB">
10 <!ENTITY stunnel-buildsize "2.9 MB">
11 <!ENTITY stunnel-time "0.08 SBU">
12]>
13
14<sect1 id="stunnel" xreflabel="Stunnel-&stunnel-version;">
15<sect1info>
16<othername>$LastChangedBy$</othername>
17<date>$Date$</date>
18</sect1info>
19<?dbhtml filename="stunnel.html"?>
20<title>Stunnel-&stunnel-version;</title>
21
22<sect2>
23<title>Introduction to <application>Stunnel</application></title>
24
25<para>The <application>Stunnel</application> package contains a program that
26allows you to encrypt arbitrary <acronym>TCP</acronym> connections inside
27<acronym>SSL</acronym> (Secure Sockets Layer) so you can easily communicate
28with clients over secure channels. <application>Stunnel</application> can be
29used to add <acronym>SSL</acronym> functionality to commonly used Inetd
30daemons like <acronym>POP</acronym>-2, <acronym>POP</acronym>-3, and
31<acronym>IMAP</acronym> servers, to standalone daemons like
32<acronym>NNTP</acronym>, <acronym>SMTP</acronym> and <acronym>HTTP</acronym>,
33and in tunneling <acronym>PPP</acronym> over network sockets without changes
34to the server package source code.</para>
35
36<sect3><title>Package information</title>
37<itemizedlist spacing="compact">
38<listitem><para>Download (HTTP): <ulink url="&stunnel-download-http;"/></para></listitem>
39<listitem><para>Download (FTP): <ulink url="&stunnel-download-ftp;"/></para></listitem>
40<listitem><para>Download size: &stunnel-size;</para></listitem>
41<listitem><para>Estimated disk space required: &stunnel-buildsize;</para></listitem>
42<listitem><para>Estimated build time: &stunnel-time;</para></listitem></itemizedlist>
43</sect3>
44
45<sect3><title><application>Stunnel</application> dependencies</title>
46<sect4><title>Required</title>
47<para><xref linkend="openssl"/></para>
48</sect4>
49
50<sect4><title>Optional</title>
51<para><xref linkend="tcpwrappers"/></para>
52</sect4>
53</sect3>
54
55</sect2>
56
57<sect2>
58<title>Installation of <application>Stunnel</application></title>
59
60<para>The <command>stunnel</command> daemon will be run in a
61<command>chroot</command> jail by an unprivileged user. Create the new user,
62group and <command>chroot</command> home directory structure using the
63following commands:</para>
64
65<screen><userinput><command>groupadd stunnel &amp;&amp;
66useradd -c "Stunnel Daemon" -d /var/lib/stunnel -g stunnel -s /bin/false stunnel &amp;&amp;
67install -d -m 700 -o stunnel -g stunnel /var/lib/stunnel/run</command></userinput></screen>
68
69<note><para>A signed <acronym>SSL</acronym> Certificate and a Private Key is
70necessary to run the <command>stunnel</command> daemon. If you own, or have
71already created a signed <acronym>SSL</acronym> Certificate you wish to use,
72copy it to <filename>tools/stunnel.pem</filename> in the source directory
73before starting the build, otherwise you will be prompted to create one. The
74<filename>.pem</filename> file must be formatted as shown below:</para>
75
76<screen>-----BEGIN RSA PRIVATE KEY-----
77<replaceable>[many encrypted lines of unencrypted key]</replaceable>
78-----END RSA PRIVATE KEY-----
79-----BEGIN CERTIFICATE-----
80<replaceable>[many encrypted lines of certificate]</replaceable>
81-----END CERTIFICATE-----</screen></note>
82
83<para>Install <application>Stunnel</application> by running the following
84commands:</para>
85
86<screen><userinput><command>./configure --prefix=/usr --sysconfdir=/etc &amp;&amp;
87make &amp;&amp;
88make install</command></userinput></screen>
89
90</sect2>
91
92<sect2>
93<title>Command explanations</title>
94
95<para><parameter>--sysconfdir=/etc</parameter>: This parameter forces the
96configuration directory to <filename class='directory'>/etc</filename> instead
97of <filename class='directory'>/usr/etc</filename>.</para>
98
99<para><command>make</command>: This command builds the package and, if you
100did not copy an <filename>stunnel.pem</filename> file to the source
101<filename class='directory'>tools/</filename> directory, prompts you for the
102necessary information to create one. Ensure you reply to the</para>
103
104<screen><computeroutput>Common Name (FQDN of your server) [localhost]:</computeroutput></screen>
105
106<para>prompt with the name or <acronym>IP</acronym> address you will be using
107to access the service.</para>
108
109</sect2>
110
111<sect2>
112<title>Configuring <application>Stunnel</application></title>
113
114<sect3><title>Config files</title>
115<para><filename>/etc/stunnel/stunnel.conf</filename></para>
116</sect3>
117
118<sect3><title>Configuration Information</title>
119
120<para>Create a basic <filename>/etc/stunnel/stunnel.conf</filename>
121configuration file using the following commands:</para>
122
123<screen><userinput><command>cat &gt;/etc/stunnel/stunnel.conf &lt;&lt; "EOF"</command>
124# File: /etc/stunnel/stunnel.conf
125
126pid = /run/stunnel.pid
127chroot = /var/lib/stunnel
128client = no
129setuid = stunnel
130setgid = stunnel
131
132<command>EOF</command></userinput></screen>
133
134<para>Next, you need to add the service you wish to encrypt to the
135configuration file. The format is as follows:</para>
136
137<screen><userinput>[<replaceable>[service]</replaceable>]
138accept = <replaceable>[hostname:portnumber]</replaceable>
139connect = <replaceable>[hostname:portnumber]</replaceable></userinput></screen>
140
141<para>If you use <application>Stunnel</application> to encrypt a daemon
142started from <command>[x]inetd</command>, you may need to disable that daemon
143in the <filename>/etc/[x]inetd.conf</filename> file and enable a corresponding
144<replaceable>[service]</replaceable>_stunnel service. You may have to add an
145appropriate entry in <filename>/etc/services</filename> as well.</para>
146
147<para>For a full explanation of the commands and syntax used in the
148configuration file, run <command>man stunnel</command>. To see a
149<acronym>BLFS</acronym> example of an actual setup of an
150<command>stunnel</command> encrypted service, read the
151<acronym>SWAT</acronym> configuration section in the <xref linkend="samba3"/>
152instructions.</para>
153
154<para>To automatically start the <command>stunnel</command> daemon when the system
155is rebooted, install the <filename>/etc/rc.d/init.d/stunnel</filename>
156bootscript from the <xref linkend="intro-important-bootscripts"/>
157package.</para>
158
159<screen><userinput><command>make install-stunnel</command></userinput></screen>
160</sect3>
161
162</sect2>
163
164<sect2>
165<title>Contents</title>
166
167<para>The <application>Stunnel</application> package contains
168<command>stunnel</command> and
169<filename class='libraryfile'>libstunnel</filename>.</para>
170
171</sect2>
172
173<sect2><title>Description</title>
174
175<sect3><title>stunnel</title>
176<para><command>stunnel</command> is a program designed to work as an
177<acronym>SSL</acronym> encryption wrapper between remote clients and local
178(<command>[x]inetd</command>-startable) or remote servers.</para></sect3>
179
180</sect2>
181
182</sect1>
183
Note: See TracBrowser for help on using the repository browser.