<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Debian Tutorials &#187; ssl</title>
	<atom:link href="http://www.debiantutorials.com/tag/ssl/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.debiantutorials.com</link>
	<description>Copy/Paste tutorials for Debian based Linux distros</description>
	<lastBuildDate>Tue, 27 Dec 2011 01:15:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Securing unencrypted traffic with stunnel</title>
		<link>http://www.debiantutorials.com/securing-unencrypted-traffic-with-stunnel/</link>
		<comments>http://www.debiantutorials.com/securing-unencrypted-traffic-with-stunnel/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 20:54:44 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[Lenny]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[lenny]]></category>
		<category><![CDATA[samba]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[stunnel]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.net/?p=130</guid>
		<description><![CDATA[Stunnel can be used to provide secure encrypted connections for clients or servers that do not speak TLS or SSL natively. In this tutorial we'll secure Samba connection but you could use this for other services like SMTP, IMAP, POP3 etc. If you are securing a service where the client supports encrypting like SMTP, IMAP [...]]]></description>
			<content:encoded><![CDATA[<p>Stunnel can be used to provide secure encrypted connections for clients or servers that do not speak TLS or SSL natively. In this tutorial we'll secure Samba connection but you could use this for other services like SMTP, IMAP, POP3 etc.</p>
<p>If you are securing a service where the client supports encrypting like SMTP, IMAP and POP3 you can skip the client step.</p>
<p><strong>Server</strong></p>
<p>1. Install stunnel</p>
<p><code>apt-get install stunnel<br />
</code><span id="more-130"></span></p>
<p>2. Configure Samba to only listen on localhost only (pico /etc/samba/smb.conf)</p>
<p><code>interfaces = 127.0.0.0/8<br />
bind interfaces only = yes<br />
</code></p>
<p>3. Restart Samba</p>
<p><code>/etc/init.d/samba restart<br />
</code></p>
<p>4. Create SSL certificate and a key</p>
<p><code>openssl req -new -nodes -x509 -out /etc/stunnel/stunnel.pem -keyout /etc/stunnel/stunnel.pem<br />
</code></p>
<p>5. Configure stunnel to listen for secure connections on port 8139 and forward to port 139 on localhost (pico /etc/stunnel/stunnel.conf)</p>
<p><code>cert = /etc/stunnel/stunnel.pem<br />
&nbsp;<br />
[smb]<br />
accept  = 8139<br />
connect = 139<br />
</code></p>
<p>6. Enable stunnel (pico /etc/default/stunnel4)</p>
<p><code>ENABLED=1<br />
</code></p>
<p>7. Start stunnel</p>
<p><code>/etc/init.d/stunnel4 restart<br />
</code></p>
<p><strong>Client</strong></p>
<p>1. Install stunnel and smbclient</p>
<p><code>apt-get install smbclient stunnel<br />
</code></p>
<p>2. Configure stunnel to listen for connections on localhost:139 and forward to the server on port 8139 using a secure connection (pico /etc/stunnel/stunnel.conf)</p>
<p><code>client = yes<br />
&nbsp;<br />
[smb]<br />
accept  = localhost:139<br />
connect = {ip}:8139<br />
</code></p>
<p><em>Replace {ip} with the IP address of your server previously configured</em></p>
<p>3. Enable stunnel (pico /etc/default/stunnel4)</p>
<p><code>ENABLED=1<br />
</code></p>
<p>4. Start stunnel</p>
<p><code>/etc/init.d/stunnel4 restart<br />
</code></p>
<p>5. Test the connection using smbclient</p>
<p><code>smbclient -U user1 //localhost/sambashare<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/securing-unencrypted-traffic-with-stunnel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
