<?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>RedHatVN Network &#187; proftpd</title>
	<atom:link href="http://redhatvn.net/tag/proftpd/feed" rel="self" type="application/rss+xml" />
	<link>http://redhatvn.net</link>
	<description>Shared Linux problems</description>
	<lastBuildDate>Tue, 07 Sep 2010 08:08:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Proftp log file shows strange fff with IP address</title>
		<link>http://redhatvn.net/proftp-log-file-shows-strange-fff-with-ip-address</link>
		<comments>http://redhatvn.net/proftp-log-file-shows-strange-fff-with-ip-address#comments</comments>
		<pubDate>Thu, 08 Apr 2010 07:41:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Cpanel]]></category>
		<category><![CDATA[Directadmin]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[proftpd]]></category>

		<guid isPermaLink="false">http://redhatvn.net/?p=1149</guid>
		<description><![CDATA[I have often noticed that while running ftp server with ProFTP there are strange f’s coming with ipadress like FFFF:11.33.44.99 I got this fixed by disabling IPv6 used by Proftp. Just put this one line in your proftp configuration file /etc/proftpd.conf UseIPv6 off You can see the changes while analysing the /var/log/secure log file for [...]]]></description>
			<content:encoded><![CDATA[<p>I have often noticed that while running ftp server with ProFTP there  are strange  f’s coming  with ipadress like FFFF:11.33.44.99</p>
<p>I got this fixed by disabling IPv6 used by Proftp. Just put this one  line in your proftp configuration file /etc/proftpd.conf</p>
<p><code>UseIPv6 off</code></p>
<p>You can see the changes while analysing the /var/log/secure log file  for any login attempts.</p>
]]></content:encoded>
			<wfw:commentRss>http://redhatvn.net/proftp-log-file-shows-strange-fff-with-ip-address/feed</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
		<item>
		<title>Shell Script to email Successful Ftp Logins</title>
		<link>http://redhatvn.net/shell-script-to-email-successful-ftp-logins</link>
		<comments>http://redhatvn.net/shell-script-to-email-successful-ftp-logins#comments</comments>
		<pubDate>Fri, 25 Dec 2009 06:10:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Cpanel]]></category>
		<category><![CDATA[Directadmin]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[shell script]]></category>
		<category><![CDATA[vps]]></category>
		<category><![CDATA[proftpd]]></category>

		<guid isPermaLink="false">http://redhatvn.net/?p=986</guid>
		<description><![CDATA[This Shell script will search the server logs on daily basis and will email you the successful Ftp Logins of the day. The ftp logs are saved in the /var/log/messages file as by default there is no separate log file for Ftp in Linux. Create a file /home/script/ftplogins.sh and paste the below code: #!/bin/bash #Retrieve [...]]]></description>
			<content:encoded><![CDATA[<p>This Shell script will search the server logs on daily basis and will email you the successful Ftp Logins of the day. The ftp logs are saved in the /var/log/messages file as by default there is no separate log file for Ftp in Linux.<br />
<span id="more-986"></span><br />
<strong>Create a file /home/script/ftplogins.sh</strong> and paste the below code:</p>
<blockquote><p>#!/bin/bash</p>
<p>#Retrieve the current date</p>
<p>CUR_DATE=`date | awk ‘{print $2″ ” $3}’`</p>
<p>#Create a temporary file to store the logs<br />
touch /tmp/out.txt</p>
<p>echo “Successful Ftp Logins on “$CUR_DATE”&#8221; &gt; /tmp/out.txt</p>
<p>#Search the successful attempts and save in the temporary file</p>
<p>/bin/grep “$CUR_DATE” /var/log/messages | grep pure-ftpd | grep login &gt;&gt; /tmp/out.txt</p>
<p>#Email the contents of the file to your email address<br />
/bin/mail -s “Successful Ftp Login Attempts on “$CUR_DATE” ” youremail@yourdomain.com &lt; /tmp/out.txt</p></blockquote>
<p>Save the file. You now have to schedule a cron to execute the file once in a day to search logs. Edit the cron file</p>
<p><code><strong>crontab -e</strong></code></p>
<p>and add the following cron job</p>
<blockquote><p><span style="color: #ff6600;"><strong>59 23 * * * /bin/sh /home/script/ftologins.sh</strong></span></p></blockquote>
<p>Note: This script will work with Pure-Ftpd server. You will have to edit the search string a bit according to your Ftp server.</p>
]]></content:encoded>
			<wfw:commentRss>http://redhatvn.net/shell-script-to-email-successful-ftp-logins/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOW-TO: SFTP support in ProFTPD</title>
		<link>http://redhatvn.net/how-to-sftp-support-in-proftpd</link>
		<comments>http://redhatvn.net/how-to-sftp-support-in-proftpd#comments</comments>
		<pubDate>Fri, 31 Jul 2009 16:37:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Directadmin]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[proftpd]]></category>

		<guid isPermaLink="false">http://redhatvn.net/?p=25</guid>
		<description><![CDATA[DA comes with support for ProFTPD mod_tls however there are several problems with mod_tls. 1) It only encrypts the control channel of FTP, leaving the actual data transferred still in clear text. 2) That also causes problems with FTP traversal of firewalls since the firewall can&#8217;t see which ports are going to be needed, although [...]]]></description>
			<content:encoded><![CDATA[<p>DA comes with support for ProFTPD mod_tls however there are several problems with mod_tls. 1) It only encrypts the control channel of FTP, leaving the actual data transferred still in clear text. 2) That also causes problems with FTP traversal of firewalls since the firewall can&#8217;t see which ports are going to be needed, although that can be worked around with PassivePorts configuration in ProFTPD. 3) FTP/TLS support is also less common in FTP clients.</p>
<p><span id="more-25"></span>I&#8217;m sure some here have been using SFTP with DirectAdmin however that is done over the system&#8217;s SSH daemon. The problems with this are 1) users must be given ssh access to use SFTP. 2) You can&#8217;t restrict SSH access to certain IPs if you have customers needing to use SFTP. 3) It only lets DirectAdmin Users login, if a user creates a child FTP account, it will not work for SFTP.</p>
<p>SFTP hasn&#8217;t been supported by many common FTP servers such as ProFTPD, until TJ Saunders recently wrote a mod_sftp for ProFTPD. I&#8217;ve set it up for several people recently and it works really well. It addresses all of the above problems.</p>
<p>The only drawback to this implementation is that all users on the system will need to switch to SFTP. I might try to come up with a setup for running both SFTP and insecure-FTP later if there is demand.</p>
<p><strong>Step 1.  Change your ssh port (optional)</strong></p>
<p>I recommend changing your ssh port if you haven&#8217;t done so already. This is done by changing the Port line in /etc/ssh/sshd_config and restarting sshd. Make sure you know what you are doing before attempting this, since you could lock yourself out of the server.</p>
<p><strong>Step 2.  Compile new ProFTPD with mod_sftp</strong></p>
<p>Assuming your system has all of the tools and libraries for compiling, just run these commands:</p>
<div style="margin: 5px 20px 20px;">
<div style="margin-bottom: 2px;">Code:</div>
<blockquote><p>cd /usr/src<br />
wget http://files.directadmin.com/services/customapache/proftpd-1.3.2.tar.gz<br />
tar xvzf proftpd-1.3.2.tar.gz<br />
cd proftpd-1.3.2<br />
cd contrib<br />
wget http://www.castaglia.org/proftpd/modules/proftpd-mod-sftp-0.9.6.tar.gz<br />
tar xvfz proftpd-mod-sftp-0.9.6.tar.gz<br />
cd ..<br />
 install_user=ftp install_group=ftp ./configure \<br />
&#8211;prefix=/usr/local &#8211;sysconfdir=/etc \<br />
&#8211;localstatedir=/var/run &#8211;mandir=/usr/local/man \<br />
&#8211;without-pam &#8211;disable-auth-pam &#8211;enable-openssl \<br />
&#8211;with-modules=mod_ratio:mod_readme:mod_sftp LDFLAGS=-static</p></blockquote>
</div>
<p>Note:  change prefix to /usr if this is Linux instead of FreeBSD.</p>
<div style="margin: 5px 20px 20px;">
<div style="margin-bottom: 2px;">Code:</div>
<blockquote><p>make<br />
make install</p></blockquote>
</div>
<p><strong>Step 3.  Make sure new ProFTPD is working</strong></p>
<p>Restart proftpd, Linux:</p>
<div style="margin: 5px 20px 20px;">
<div style="margin-bottom: 2px;">Code:</div>
<blockquote><p> service proftpd restart</p></blockquote>
</div>
<p>FreeBSD:</p>
<div style="margin: 5px 20px 20px;">
<div style="margin-bottom: 2px;">Code:</div>
<blockquote><p> /usr/local/etc/rc.d/proftpd restart</p></blockquote>
</div>
<p>Make sure you can still connect to your FTP server.  You should see version 1.3.2:</p>
<div style="margin: 5px 20px 20px;">
<div style="margin-bottom: 2px;">Code:</div>
<blockquote><p># ftp myserver.com<br />
Connected to myserver.com (210.245.x.x).<br />
220 ProFTPD 1.3.2 Server ready.<br />
Name (myserver.com):</p></blockquote>
</div>
<p><strong> Step 4a.  Change Port in ProFTPD </strong></p>
<p>Open /etc/proftpd.conf in an editor and change the Port to what you want SFTP to use. To make it easy on your users you could use Port 22 since it would be the default in SFTP clients. You could also pick something random such as 3822.</p>
<div style="margin: 5px 20px 20px;">
<div style="margin-bottom: 2px;">Code:</div>
<blockquote><p>Port    22</p></blockquote>
</div>
<p><strong> Step 4b.  Enable SFTP in main proftpd.conf</strong></p>
<p>Add the following lines to your /etc/proftpd.conf file, somewhere near the top of the file so its easy to find:</p>
<div style="margin: 5px 20px 20px;">
<div style="margin-bottom: 2px;">Code:</div>
<blockquote><p>SFTPEngine      On<br />
SFTPHostKey /etc/ssh/ssh_host_rsa_key<br />
SFTPHostKey /etc/ssh/ssh_host_dsa_key</p></blockquote>
</div>
<p><strong> Step 4c.  Enable SFTP in IP-based FTP vhosts </strong></p>
<p>Add the following lines into EACH VirtualHost container in /etc/proftpd.vhosts.conf:</p>
<div style="margin: 5px 20px 20px;">
<div style="margin-bottom: 2px;">Code:</div>
<blockquote><p>SFTPEngine      On<br />
Port            22<br />
SFTPHostKey /etc/ssh/ssh_host_rsa_key<br />
SFTPHostKey /etc/ssh/ssh_host_dsa_key</p></blockquote>
</div>
<p>The Port should match what you used in Step 4a. Make sure you put these 4 new lines before EACH &lt;/VirtualHost&gt; in that file.</p>
<p><strong> Step 4d.  Enable SFTP config in FTP vhost template </strong></p>
<p>Add the same 4 lines into /usr/local/directadmin/data/templates/proftpd.vhosts.conf before the &lt;/VirtualHost&gt; line</p>
<div style="margin: 5px 20px 20px;">
<div style="margin-bottom: 2px;">Code:</div>
<blockquote><p>SFTPEngine      On<br />
Port            22<br />
SFTPHostKey /etc/ssh/ssh_host_rsa_key<br />
SFTPHostKey /etc/ssh/ssh_host_dsa_key</p></blockquote>
</div>
<p>Again, the Port should match what you used in Step 4a</p>
<p><strong> Step 5.  Restart ProFTPD </strong></p>
<p>Restart proftpd, Linux:</p>
<div style="margin: 5px 20px 20px;">
<div style="margin-bottom: 2px;">Code:</div>
<blockquote><p> service proftpd restart</p></blockquote>
</div>
<p>FreeBSD:</p>
<div style="margin: 5px 20px 20px;">
<div style="margin-bottom: 2px;">Code:</div>
<blockquote><p> /usr/local/etc/rc.d/proftpd restart</p></blockquote>
</div>
<p><strong> Step 6.  Test it out </strong></p>
<p>Test it out!  If you telnet to the new port you should see a greeting like this:</p>
<div style="margin: 5px 20px 20px;">
<div style="margin-bottom: 2px;">Code:</div>
<blockquote><p># telnet myserver.com 22<br />
Trying 210.245.x.x&#8230;<br />
Connected to myserver.com.<br />
Escape character is &#8216;^]&#8217;.<br />
SS´[&#8216;Å0-mod_sftp/0.9.6<br />
Lß    ç_ªC.ÃÇdiffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14- &#8230;</p></blockquote>
</div>
<p>That is normal. Now use an SFTP client like FileZilla and try it out. You should use the exact same usernames and passwords as you did previously for FTP.</p>
]]></content:encoded>
			<wfw:commentRss>http://redhatvn.net/how-to-sftp-support-in-proftpd/feed</wfw:commentRss>
		<slash:comments>7</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! -->