]> git.sur5r.net Git - bacula/docs/blobdiff - docs/manual/stunnel.tex
Update
[bacula/docs] / docs / manual / stunnel.tex
index 23d495d87af2a2528c5d53b9616fee11eb6edef5..4907865175d951904e7ec9a5c0d953db86b2d01e 100644 (file)
@@ -1,12 +1,9 @@
 %%
 %%
 
-\section*{Using stunnel to Encrypt Communications to Clients}
-\label{_ChapterStart6}
-\index[general]{Clients!Using Bacula to Encrypt Communications to }
-\index[general]{Using Bacula to Encrypt Communications to Clients }
-\addcontentsline{toc}{section}{Using Bacula to Encrypt Communications to
-Clients}
+\chapter{Using Stunnel to Encrypt Communications}
+\label{StunnelChapter}
+\index[general]{Using Stunnel to Encrypt Communications to Clients }
 
 Prior to version 1.37, Bacula did not have built-in communications encryption.
 Please see the \ilink {TLS chapter}{CommEncryption} if you are using Bacula
@@ -22,10 +19,9 @@ principles apply whether you are encrypting between Unix, Linux, or Win32
 machines. This example was developed between two Linux machines running
 stunnel version 4.04-4 on a Red Hat Enterprise 3.0 system. 
 
-\subsection*{Communications Ports Used}
+\section{Communications Ports Used}
 \index[general]{Used!Communications Ports }
 \index[general]{Communications Ports Used }
-\addcontentsline{toc}{subsection}{Communications Ports Used}
 
 First, you must know that with the standard Bacula configuration, the Director
 will contact the File daemon on port 9102. The File daemon then contacts the
@@ -35,9 +31,8 @@ the world, the File daemon is a server to the Director (i.e. listens for the
 Director to contact it), and the Storage daemon is a server to the File
 daemon.
 
-\subsection*{Encryption}
+\section{Encryption}
 \index[general]{Encryption }
-\addcontentsline{toc}{subsection}{Encryption}
 
 The encryption is accomplished between the Director and the File daemon by
 using an stunnel on the Director's machine (server) to encrypt the data and to
@@ -54,9 +49,8 @@ isn't. To accomplish this, we will need to construct four separate conf files
 for stunnel, and we will need to make some minor modifications to the
 Director's conf file. None of the other conf files need to be changed. 
 
-\subsection*{A Picture}
+\section{A Picture}
 \index[general]{Picture }
-\addcontentsline{toc}{subsection}{Picture}
 
 Since pictures usually help a lot, here is an overview of what we will be
 doing. Don't worry about all the details of the port numbers and such for the
@@ -85,9 +79,8 @@ moment.
 \end{verbatim}
 \normalsize
 
-\subsection*{Certificates}
+\section{Certificates}
 \index[general]{Certificates }
-\addcontentsline{toc}{subsection}{Certificates}
 
 In order for stunnel to function as a server, which it does in our diagram for
 Stunnel 1 and Stunnel 4, you must have a certificate and the key. It is
@@ -106,10 +99,9 @@ middle attack and hence loss of your data.
 
 See below for how to create a self-signed certificate. 
 
-\subsection*{Securing the Data Channel}
+\section{Securing the Data Channel}
 \index[general]{Channel!Securing the Data }
 \index[general]{Securing the Data Channel }
-\addcontentsline{toc}{subsection}{Securing the Data Channel}
 
 To simplify things a bit, let's for the moment consider only the data channel.
 That is the connection between the File daemon and the Storage daemon, which
@@ -128,11 +120,9 @@ Storage daemon, which doesn't understand encrypted data. On the server
 machine, we run Stunnel 4, which listens on port 29103, decrypts the data and
 sends it to the Storage daemon, which is listening on port 9103. 
 
-\subsection*{Modification of bacula-dir.conf for the Data Channel}
+\section{Data Channel Configuration}
 \index[general]{Modification of bacula-dir.conf for the Data Channel }
-\index[general]{Channel!Modification of bacula-dir.conf for the Data }
-\addcontentsline{toc}{subsection}{Modification of bacula-dir.conf for the Data
-Channel}
+\index[general]{baculoa-dir.conf!Modification for the Data Channel }
 
 The Storage resource of the bacula-dir.conf normally looks something like the
 following: 
@@ -171,11 +161,8 @@ This causes the File daemon to send the data to the stunnel running on
 localhost (the client machine). We could have used client as the address as
 well. 
 
-\subsection*{config Files for stunnel to Encrypt the Data Channel}
-\index[general]{Config Files for stunnel to Encrypt the Data Channel }
-\index[general]{Channel!config Files for stunnel to Encrypt the Data }
-\addcontentsline{toc}{subsection}{config Files for stunnel to Encrypt the Data
-Channel}
+\section{Stunnel Configuration for the Data Channel}
+\index[general]{Stunnel Configuration for the Data Channel }
 
 In the diagram above, we see above Stunnel 2 that we use stunnel-fd2.conf on the
 client. A pretty much minimal config file would look like the following: 
@@ -257,10 +244,9 @@ connect = 9103
 \end{verbatim}
 \normalsize
 
-\subsection*{Starting and Testing the Data Encryption}
+\section{Starting and Testing the Data Encryption}
 \index[general]{Starting and Testing the Data Encryption }
 \index[general]{Encryption!Starting and Testing the Data }
-\addcontentsline{toc}{subsection}{Starting and Testing the Data Encryption}
 
 It will most likely be the simplest to implement the Data Channel encryption
 in the following order: 
@@ -294,10 +280,9 @@ in the following order:
    the stunnels, rerun the job, repeat until it works. 
    \end{itemize}
 
-\subsection*{Encrypting the Control Channel}
+\section{Encrypting the Control Channel}
 \index[general]{Channel!Encrypting the Control }
 \index[general]{Encrypting the Control Channel }
-\addcontentsline{toc}{subsection}{Encrypting the Control Channel}
 
 The Job control channel is between the Director and the File daemon, and as
 mentioned above, it is not really necessary to encrypt, but it is good
@@ -309,11 +294,8 @@ client:29102. Again we use port 29102 so that the stunnel on the client
 machine can decrypt the data before passing it on to port 9102 where the File
 daemon is listening. 
 
-\subsection*{Modification of bacula-dir.conf for the Control Channel}
-\index[general]{Channel!Modification of bacula-dir.conf for the Control }
-\index[general]{Modification of bacula-dir.conf for the Control Channel }
-\addcontentsline{toc}{subsection}{Modification of bacula-dir.conf for the
-Control Channel}
+\section{Control Channel Configuration}
+\index[general]{Control Channel Configuration }
 
 We need to modify the standard Client resource, which would normally look
 something like: 
@@ -347,11 +329,8 @@ Client {
 This will cause the Director to send the control information to
 localhost:29102 instead of directly to the client. 
 
-\subsection*{config Files for stunnel to Encrypt the Control Channel}
+\section{Stunnel Configuration for the Control Channel}
 \index[general]{Config Files for stunnel to Encrypt the Control Channel }
-\index[general]{Channel!config Files for stunnel to Encrypt the Control }
-\addcontentsline{toc}{subsection}{config Files for stunnel to Encrypt the
-Control Channel}
 
 The stunnel config file, stunnel-dir.conf, for the Director's machine would
 look like the following: 
@@ -407,10 +386,9 @@ connect = client:29102
 \end{verbatim}
 \normalsize
 
-\subsection*{Starting and Testing the Control Channel}
+\section{Starting and Testing the Control Channel}
 \index[general]{Starting and Testing the Control Channel }
 \index[general]{Channel!Starting and Testing the Control }
-\addcontentsline{toc}{subsection}{Starting and Testing the Control Channel}
 
 It will most likely be the simplest to implement the Control Channel
 encryption in the following order: 
@@ -442,10 +420,9 @@ encryption in the following order:
    the stunnels, rerun the job, repeat until it works. 
    \end{itemize}
 
-\subsection*{Using stunnel to Encrypt to a Second Client}
+\section{Using stunnel to Encrypt to a Second Client}
 \index[general]{Using stunnel to Encrypt to a Second Client }
 \index[general]{Client!Using stunnel to Encrypt to a Second }
-\addcontentsline{toc}{subsection}{Using stunnel to Encrypt to a Second Client}
 
 On the client machine, you can just duplicate the setup that you have on the
 first client file for file and it should work fine. 
@@ -516,10 +493,9 @@ connect = client2:29102
 There are no changes necessary to the Storage daemon or the other stunnel so
 that this new client can talk to our Storage daemon. 
 
-\subsection*{Creating a Self-signed Certificate}
+\section{Creating a Self-signed Certificate}
 \index[general]{Creating a Self-signed Certificate }
 \index[general]{Certificate!Creating a Self-signed }
-\addcontentsline{toc}{subsection}{Creating a Self-signed Certificate}
 
 You may create a self-signed certificate for use with stunnel that will permit
 you to make it function, but will not allow certificate validation. The .pem
@@ -550,10 +526,9 @@ The above script will ask you a number of questions. You may simply answer
 each of them by entering a return, or if you wish you may enter your own data.
 
 
-\subsection*{Getting a CA Signed Certificate}
+\section{Getting a CA Signed Certificate}
 \index[general]{Certificate!Getting a CA Signed }
 \index[general]{Getting a CA Signed Certificate }
-\addcontentsline{toc}{subsection}{Getting a CA Signed Certificate}
 
 The process of getting a certificate that is signed by a CA is quite a bit
 more complicated. You can purchase one from quite a number of PKI vendors, but
@@ -570,10 +545,9 @@ http://ospkibook.sourceforge.net/docs/OSPKI-2.4.7/OSPKI-html/ospki-book.htm}
 {http://ospkibook.sourceforge.net/docs/OSPKI-2.4.7/OSPKI-html/ospki-book.htm}.
 Note, this link may change. 
 
-\subsection*{Using ssh to Secure the Communications}
+\section{Using ssh to Secure the Communications}
 \index[general]{Communications!Using ssh to Secure the }
 \index[general]{Using ssh to Secure the Communications }
-\addcontentsline{toc}{subsection}{Using ssh to Secure the Communications}
 
 Please see the script {\bf ssh-tunnel.sh} in the {\bf examples} directory. It
 was contributed by Stephan Holl.