<?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; Security</title>
	<atom:link href="http://www.debiantutorials.com/category/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.debiantutorials.com</link>
	<description>Copy/Paste tutorials for Debian Linux</description>
	<lastBuildDate>Wed, 18 Aug 2010 00:35:59 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Prevent brute force attacks using fail2ban</title>
		<link>http://www.debiantutorials.com/prevent-brute-force-attacks-using-fail2ban/</link>
		<comments>http://www.debiantutorials.com/prevent-brute-force-attacks-using-fail2ban/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 22:38:04 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[Lenny]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[fail2ban]]></category>
		<category><![CDATA[iptables]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.net/?p=329</guid>
		<description><![CDATA[fail2ban monitors log files such as /var/log/auth.log and /var/log/apache/access.log and temporarily or persistently bans failure-prone addresses by updating existing firewall rules. Currently, by default, fail2ban supports ssh/apache/vsftpd but configuration can be easily extended for monitoring any other ASCII file.
1. Install fail2ban
apt-get install fail2ban

2. Test by connecting via ssh and making three incorrect password attempts. By [...]]]></description>
			<content:encoded><![CDATA[<p>fail2ban monitors log files such as /var/log/auth.log and /var/log/apache/access.log and temporarily or persistently bans failure-prone addresses by updating existing firewall rules. Currently, by default, fail2ban supports ssh/apache/vsftpd but configuration can be easily extended for monitoring any other ASCII file.</p>
<p>1. Install fail2ban</p>
<p><code>apt-get install fail2ban<br />
</code><span id="more-329"></span></p>
<p>2. Test by connecting via ssh and making three incorrect password attempts. By default fail2ban blocks the IP address for 10 minutes.</p>
<p>You can tail the fail2ban log file to monitor actions:</p>
<p><code>tail -f /var/log/fail2ban.log<br />
</code></p>
<p>Sample results</p>
<p><code>2010-06-21 22:27:58,953 fail2ban.jail   : INFO   Jail 'ssh' started<br />
2010-06-21 22:29:36,430 fail2ban.actions: WARNING [ssh] Ban 192.168.1.18<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/prevent-brute-force-attacks-using-fail2ban/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing HAVP (HTTP Antivirus Proxy)</title>
		<link>http://www.debiantutorials.com/installing-havp-http-antivirus-proxy/</link>
		<comments>http://www.debiantutorials.com/installing-havp-http-antivirus-proxy/#comments</comments>
		<pubDate>Sun, 13 Jun 2010 06:50:05 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[Lenny]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[clamav]]></category>
		<category><![CDATA[havp]]></category>
		<category><![CDATA[proxy]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.net/?p=315</guid>
		<description><![CDATA[HAVP (HTTP Antivirus Proxy) is a proxy with a ClamAV anti-virus scanner. The main aims are continuous, non-blocking downloads and smooth scanning of dynamic and password protected HTTP traffic. Havp antivirus proxy has a parent and transparent proxy mode. It can be used with squid or standalone.
1. Install HAVP
apt-get install havp

2. Start HAVP if it [...]]]></description>
			<content:encoded><![CDATA[<p>HAVP (HTTP Antivirus Proxy) is a proxy with a ClamAV anti-virus scanner. The main aims are continuous, non-blocking downloads and smooth scanning of dynamic and password protected HTTP traffic. Havp antivirus proxy has a parent and transparent proxy mode. It can be used with squid or standalone.</p>
<p>1. Install HAVP</p>
<p><code>apt-get install havp<br />
</code><span id="more-315"></span></p>
<p>2. Start HAVP if it didn't start after the installation</p>
<p><code>/etc/init.d/havp start<br />
</code></p>
<p>It's ready, by default HAVP listens on port 8080. You can configure your web browser to use the server as a proxy.</p>
<p>You can customize the error pages by editing the html files in this directory: /etc/havp/templates/en/</p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/installing-havp-http-antivirus-proxy/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>OpenID authentication with the mod_auth_openid Apache module</title>
		<link>http://www.debiantutorials.com/openid-authentication-with-the-mod_auth_openid-apache-module/</link>
		<comments>http://www.debiantutorials.com/openid-authentication-with-the-mod_auth_openid-apache-module/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 21:33:10 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[Lenny]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[OpenID]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.net/?p=303</guid>
		<description><![CDATA[mod_auth_openid is an authentication module for the Apache 2 webserver. It handles the functions of an OpenID  consumer as specified in the OpenID 2.0 specification.
After a user authenticates themselves, the user's identity will be available in the REMOTE_USER variable. A cookie named open_id_session_id is saved to maintain each user's session.
1. Install the module
apt-get install [...]]]></description>
			<content:encoded><![CDATA[<p>mod_auth_openid is an authentication module for the Apache 2 webserver. It handles the functions of an OpenID  consumer as specified in the OpenID 2.0 specification.</p>
<p>After a user authenticates themselves, the user's identity will be available in the REMOTE_USER variable. A cookie named open_id_session_id is saved to maintain each user's session.</p>
<p>1. Install the module</p>
<p><code>apt-get install libapache2-mod-auth-openid<br />
</code><span id="more-303"></span></p>
<p>2. Enable the module</p>
<p><code>a2enmod authopenid<br />
</code></p>
<p>3. You can now add the line below to any Directory, Location or File directive in the virtual host configuration or a .htaccess file .</p>
<p><code>AuthOpenIDEnabled On<br />
</code></p>
<p><a href="http://trac.butterfat.net/public/mod_auth_openid" target="_blank">Click here for more configuration options, including only allowing logins from specific OpenID providers and using a custom login page</a></p>
<p>4. Restart Apache</p>
<p><code>/etc/init.d/apache2 restart<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/openid-authentication-with-the-mod_auth_openid-apache-module/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install mod_spamhaus Apache module to fight comment spam</title>
		<link>http://www.debiantutorials.com/install-modspamhaus-apache-module-to-fight-comment-spam/</link>
		<comments>http://www.debiantutorials.com/install-modspamhaus-apache-module-to-fight-comment-spam/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 20:53:01 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[Lenny]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[spam]]></category>
		<category><![CDATA[spamhaus]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.net/?p=301</guid>
		<description><![CDATA[mod_spamhaus is an Apache module for DNS Block Listing that protects web services by denying access to particular IP addresses. It can stop spam relaying via web form URL injection, and block HTTP DDoS attacks from bot-nets.
It queries sbl-xbl.spamhaus.org, taking advantage of the Spamhaus Block List (SBL) and the Exploits Block List (XBL). 
1. Download [...]]]></description>
			<content:encoded><![CDATA[<p>mod_spamhaus is an Apache module for DNS Block Listing that protects web services by denying access to particular IP addresses. It can stop spam relaying via web form URL injection, and block HTTP DDoS attacks from bot-nets.</p>
<p>It queries sbl-xbl.spamhaus.org, taking advantage of the Spamhaus Block List (SBL) and the Exploits Block List (XBL). </p>
<p>1. Download the latest mod_spamhaus deb package from sid package repository (mod_spamhaus is not available for lenny but we can use the sid package)</p>
<p><code>wget http://ftp.us.debian.org/debian/pool/main/m/mod-spamhaus/libapache2-mod-spamhaus_0.7-1_i386.deb<br />
</code><span id="more-301"></span></p>
<p>This package is for i386. If you are using other architecture, you can find a suitable package on the bottom of this page: http://packages.debian.org/sid/libapache2-mod-spamhaus</p>
<p>2. Install the package</p>
<p><code>dpkg -i libapache2-mod-spamhaus_0.7-1_i386.deb<br />
</code></p>
<p>Apache is automatically restarted and the module is enabled. If you would like to test the module you can add a line to your hosts file to make it think that your IP address is blocked (pico /etc/hosts)</p>
<p><code>127.0.0.4 1.0.168.192.sbl-xbl.spamhaus.org<br />
</code></p>
<p><em>Replace 1.0.168.192 with your IP address and reverse it. The IP address 192.168.0.1 should read 1.0.168.192.</em></p>
<p>By default, only POST, PUT, OPTIONS, CONNECT methods are blocked. You can add GET to the list of methods blocked in /etc/apache2/mods-enabled/mod-spamhaus.conf to block the spammers from seeing your website.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/install-modspamhaus-apache-module-to-fight-comment-spam/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing and configuring PPTP VPN server on lenny</title>
		<link>http://www.debiantutorials.com/installing-and-configuring-pptp-vpn-server-on-lenny/</link>
		<comments>http://www.debiantutorials.com/installing-and-configuring-pptp-vpn-server-on-lenny/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 22:21:36 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Lenny]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[pptp]]></category>
		<category><![CDATA[vpn]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.net/installing-and-configuring-pptp-vpn-server-on-lenny/</guid>
		<description><![CDATA[If you would like to setup a Virtual Private Network (VPN) for Windows clients, PPTP is a great choice. It's easy to set up on the server and you don't need any additional software for the Windows clients to connect.
1. Install the required packages
apt-get install pptpd

2. Configure the IP range assigned to clients (pico /etc/pptpd.conf)
localip [...]]]></description>
			<content:encoded><![CDATA[<p>If you would like to setup a Virtual Private Network (VPN) for Windows clients, PPTP is a great choice. It's easy to set up on the server and you don't need any additional software for the Windows clients to connect.</p>
<p>1. Install the required packages</p>
<p><code>apt-get install pptpd<br />
</code><span id="more-237"></span></p>
<p>2. Configure the IP range assigned to clients (pico /etc/pptpd.conf)</p>
<p><code>localip 192.168.1.2<br />
remoteip 192.168.1.10-20<br />
</code></p>
<p><em>Using this config the clients are assigned any IP address between and including 192.168.1.10 and 192.168.1.20.</em></p>
<p>3. Restart the PPTP daemon</p>
<p><code>/etc/init.d/pptpd restart<br />
</code></p>
<p>4. Create a user allowed to connect (pico /etc/ppp/chap-secrets)</p>
<p><code>user1 pptpd secretpassword *<br />
</code></p>
<p><em>Passwords are not encrypted. This allows the a user with the username: user1 and the password: secretpassword to login from any ip address.</em></p>
<p>5. Enable IP forward at startup to allow the VPN clients to connect to the server's local network. (pico /etc/sysctl.conf)</p>
<p><code>net.ipv4.ip_forward=1<br />
</codE></p>
<p>Also run this command to activate the IP forward instantly:</p>
<p><code>echo 1 > /proc/sys/net/ipv4/ip_forward<br />
</code></p>
<p>6. Create a routing rule to allow the VPN clients to route network traffic through the server.</p>
<p><code>iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE<br />
</code></p>
<p>Read this tutorial to learn how to create iptables rules on startup:<br />
<a href="http://www.debiantutorials.net/loading-iptables-rules-on-startup/">Loading iptables rules on startup</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/installing-and-configuring-pptp-vpn-server-on-lenny/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing suPHP</title>
		<link>http://www.debiantutorials.com/installing-suphp/</link>
		<comments>http://www.debiantutorials.com/installing-suphp/#comments</comments>
		<pubDate>Fri, 01 Jan 2010 22:05:02 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[Lenny]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[suphp]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.net/?p=223</guid>
		<description><![CDATA[suPHP is a tool for executing PHP scripts with the permissions of their owners. It consists of an Apache module (mod_suphp) and a setuid root binary (suphp) that is called by the Apache module to change the uid of the process executing the PHP interpreter.
1. Install suPHP
apt-get install libapache2-mod-suphp

2. Disable the php5 apache module
a2dismod php5

3. [...]]]></description>
			<content:encoded><![CDATA[<p>suPHP is a tool for executing PHP scripts with the permissions of their owners. It consists of an Apache module (mod_suphp) and a setuid root binary (suphp) that is called by the Apache module to change the uid of the process executing the PHP interpreter.</p>
<p>1. Install suPHP</p>
<p><code>apt-get install libapache2-mod-suphp<br />
</code><span id="more-223"></span></p>
<p>2. Disable the php5 apache module</p>
<p><code>a2dismod php5<br />
</code></p>
<p>3. Restart Apache</p>
<p><code>/etc/init.d/apache2 restart<br />
</code></p>
<p>4. You can test if suPHP is working correctly by creating a php file containing the following lines:</p>
<p><code>&lt;?php<br />
system('id');<br />
?&gt;<br />
</code></p>
<p>The script will return user/group id and name. Make sure you set the file owner to a user/group with id greater than 99.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/installing-suphp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scan your web server for vulnerabilities with Nikto</title>
		<link>http://www.debiantutorials.com/scan-your-web-server-for-vulnerabilities-with-nikto/</link>
		<comments>http://www.debiantutorials.com/scan-your-web-server-for-vulnerabilities-with-nikto/#comments</comments>
		<pubDate>Mon, 28 Dec 2009 09:49:56 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[nikto]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.net/?p=219</guid>
		<description><![CDATA[Nikto is a web server scanner which performs comprehensive tests against web servers for multiple items, including over 3500 potentially dangerous files/CGIs, versions on over 900 servers, and version specific problems on over 250 servers.
1. Install Nikto
apt-get install nikto

2. Test the local web server
nikto -h localhost

Nikto also supports testing on different ports. Click here for [...]]]></description>
			<content:encoded><![CDATA[<p>Nikto is a web server scanner which performs comprehensive tests against web servers for multiple items, including over 3500 potentially dangerous files/CGIs, versions on over 900 servers, and version specific problems on over 250 servers.</p>
<p>1. Install Nikto</p>
<p><code>apt-get install nikto<br />
</code><span id="more-219"></span></p>
<p>2. Test the local web server</p>
<p><code>nikto -h localhost<br />
</code></p>
<p>Nikto also supports testing on different ports. <a href="http://cirt.net/nikto2-docs/usage.html" target="_blank">Click here for Nikto usage information</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/scan-your-web-server-for-vulnerabilities-with-nikto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disable root login to SSH</title>
		<link>http://www.debiantutorials.com/disable-root-login-to-ssh/</link>
		<comments>http://www.debiantutorials.com/disable-root-login-to-ssh/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 20:44:31 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[Etch]]></category>
		<category><![CDATA[Lenny]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.net/?p=205</guid>
		<description><![CDATA[Allowing root logins to your SSH damon is a big security threat. If the SSH port is open, hackers will probably at some time attempt to brute force your root password. It's a good idea to disable root logins to SSH and instead use a normal user to login and type "su -" to enter [...]]]></description>
			<content:encoded><![CDATA[<p>Allowing root logins to your SSH damon is a big security threat. If the SSH port is open, hackers will probably at some time attempt to brute force your root password. It's a good idea to disable root logins to SSH and instead use a normal user to login and type "su -" to enter the super user shell or sudo to perform tasks that require root privileges.</p>
<p>1. Open the SSH daemon config file and change this line: (pico /etc/ssh/sshd_config)</p>
<p><code>PermitRootLogin no<br />
</code><span id="more-205"></span></p>
<p>2. Restart the SSH daemon</p>
<p><code>/etc/init.d/ssh restart<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/disable-root-login-to-ssh/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Adding a sudoer to use sudo on Debian</title>
		<link>http://www.debiantutorials.com/adding-a-sudoer-to-use-sudo-on-debian/</link>
		<comments>http://www.debiantutorials.com/adding-a-sudoer-to-use-sudo-on-debian/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 20:36:59 +0000</pubDate>
		<dc:creator>aip</dc:creator>
				<category><![CDATA[Etch]]></category>
		<category><![CDATA[Lenny]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[sudo]]></category>

		<guid isPermaLink="false">http://www.debiantutorials.net/?p=203</guid>
		<description><![CDATA[Sudo allows a system administrator to delegate authority to give certain users (or groups of users) the ability to run some (or all) commands as root or another user while providing an audit trail of the commands and their arguments.
1. Create a new user (optional)
adduser user1

2. Make sure sudo is install (installed by default on [...]]]></description>
			<content:encoded><![CDATA[<p>Sudo allows a system administrator to delegate authority to give certain users (or groups of users) the ability to run some (or all) commands as root or another user while providing an audit trail of the commands and their arguments.</p>
<p>1. Create a new user (optional)</p>
<p><code>adduser user1<br />
</code><span id="more-203"></span></p>
<p>2. Make sure sudo is install (installed by default on lenny)</p>
<p><code>apt-get install sudo<br />
</code></p>
<p>3. Add the new user to the sudo-ers list (visudo)</p>
<p><code>user1 ALL=(ALL) ALL<br />
</code></p>
<p><em>This will allow user1 to run all commands that require root privileges. You can also limit the access, <a href="http://www.sudo.ws/sudo/man/sudoers.html" target="_blank">Click here to view the syntax</a></em></p>
<p>4. Save the file by pressing Ctrl-X if you are using Nano/pico or :w if using vi</p>
<p>You can now login as the standard user (user1) and execute commands that require root privileges using sudo.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.debiantutorials.com/adding-a-sudoer-to-use-sudo-on-debian/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<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 and [...]]]></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>
