21.03.2013 Views

Problem - Kevin Tafuro

Problem - Kevin Tafuro

Problem - Kevin Tafuro

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Client mode<br />

To enable client mode, set the global option key client to yes. In client mode,<br />

Stunnel expects incoming connection to be operating without SSLand makes<br />

outgoing connections using SSL. A certificate and key may be specified, but they<br />

are not required.<br />

The following example starts up two servers. The first is for IMAP over SSL, which<br />

will listen for SSLconnections on port 993 and redirect traffic without SSLto a connection<br />

on port 110. The second is for POP3 over SSL, which will listen for SSL connections<br />

on port 995 for the localhost (127.0.0.1) interface only. Outgoing<br />

connections will be made to port 110 on the localhost interface.<br />

client = no<br />

cert = /home/mmessier/ssl/servercert.pem<br />

key = /home/mmessier/ssl/serverkey.pem<br />

[imaps]<br />

accept = 993<br />

connect = 143<br />

[pop3]<br />

accept = localhost:995<br />

connect = localhost:110<br />

In the following example, Stunnel operates in client mode. It listens for connections<br />

on the localhost interface on port 25, and it redirects traffic to port 465 on<br />

smtp.secureprogramming.com. This example would be useful for a mail client that<br />

does not support SMTP over SSL.<br />

client = yes<br />

[smtp]<br />

accept = localhost:25<br />

connect = smtp.secureprogramming.com:465<br />

See Also<br />

Stunnel web page: http://www.stunnel.org<br />

9.6 Using Kerberos Encryption<br />

<strong>Problem</strong><br />

You need to use encryption in code that already uses Kerberos for authentication.<br />

Solution<br />

Kerberos is primarily an authentication service employed for network services. As a<br />

side effect of the requirements to perform authentication, Kerberos also provides an<br />

470 | Chapter 9: Networking<br />

This is the Title of the Book, eMatter Edition<br />

Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!