<?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>S i X h E a D { ? } &#187; ftpd</title>
	<atom:link href="http://sixhead.com/tag/ftpd/feed/" rel="self" type="application/rss+xml" />
	<link>http://sixhead.com</link>
	<description>เมื่อความรู้มีไว้แบ่งปัน</description>
	<lastBuildDate>Sun, 25 Dec 2011 04:15:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>ติดตั้ง vsftpd + ssl</title>
		<link>http://sixhead.com/2009/09/04/install-vsftp-and-ssl/</link>
		<comments>http://sixhead.com/2009/09/04/install-vsftp-and-ssl/#comments</comments>
		<pubDate>Fri, 04 Sep 2009 03:15:39 +0000</pubDate>
		<dc:creator>Pipo</dc:creator>
				<category><![CDATA[FreeBSD & Linux]]></category>
		<category><![CDATA[daemon]]></category>
		<category><![CDATA[FileZilla]]></category>
		<category><![CDATA[ftpd]]></category>
		<category><![CDATA[ssl]]></category>

		<guid isPermaLink="false">http://sixhead.com/?p=496</guid>
		<description><![CDATA[vsftpd ก็คือ FTP (Daemon) Server อีกตัวหนึ่งนั่นเองมี feature ดีๆ หลายอย่างไปอ่านกันเองครับ ที่นี่ การติดตั้งบน FreeBSD นั้นง่ายมากๆ # cd /usr/ports/ftp/vsftpd # make config (เลือกให้ support SSL ด้วย) สร้าง ssl key ก่อน # openssl req -x509 -nodes -days 3650 -newkey rsa:1024 -keyout /usr/local/etc/vsftpd.pem -out /usr/local/etc/vsftpd.pem สร้างไฟล์ /usr/local/etc/vsftpd.chroot_list ขึ้นมาโดยใส่ชื่อ root เข้าไป (เป็นการบังคับว่า user root เท่านั้นที่สามารถออกมานอก home ได้) เมื่อลงเสร็จก็ เอา config นี้ไปใส่ใน [...]]]></description>
			<content:encoded><![CDATA[<p>vsftpd ก็คือ FTP (Daemon) Server อีกตัวหนึ่งนั่นเองมี feature ดีๆ หลายอย่างไปอ่านกันเองครับ <a href="http://vsftpd.beasts.org"><span style="color: #888888;">ที่นี่</span></a><br />
การติดตั้งบน FreeBSD นั้นง่ายมากๆ<br />
<span id="more-496"></span></p>
<pre># cd /usr/ports/ftp/vsftpd
# make config (เลือกให้ support SSL ด้วย)</pre>
<p>สร้าง ssl key ก่อน</p>
<pre># openssl req -x509 -nodes -days 3650 -newkey rsa:1024 -keyout /usr/local/etc/vsftpd.pem -out /usr/local/etc/vsftpd.pem</pre>
<p>สร้างไฟล์ /usr/local/etc/vsftpd.chroot_list ขึ้นมาโดยใส่ชื่อ root เข้าไป (เป็นการบังคับว่า user root เท่านั้นที่สามารถออกมานอก home ได้)</p>
<p>เมื่อลงเสร็จก็ เอา config นี้ไปใส่ใน /usr/local/etc/vsftpd.conf ได้เลย (config นี้ไม่อนุญาติ anonymous)</p>
<pre class="perl">xferlog_file=/var/<a href="http://perldoc.perl.org/functions/log.html"><span style="color: #000066;">log</span></a>/vsftpd.<a href="http://perldoc.perl.org/functions/log.html"><span style="color: #000066;">log</span></a>
ftpd_banner=<span style="color: #ff0000;">&quot;Welcome to Sixhead Server&quot;</span>
<a href="http://perldoc.perl.org/functions/listen.html"><span style="color: #000066;">listen</span></a>=YES
max_clients=<span style="color: #cc66cc;">200</span>
max_per_ip=<span style="color: #cc66cc;">5</span>
file_open_mode=<span style="color: #cc66cc;">0777</span>
local_umask=<span style="color: #cc66cc;">0022</span>
&nbsp;
local_enable=YES
write_enable=YES
&nbsp;
chroot_local_user=YES
chroot_list_enable=YES
chroot_list_file=/usr/<a href="http://perldoc.perl.org/functions/local.html"><span style="color: #000066;">local</span></a>/etc/vsftpd.chroot_list
&nbsp;
connect_from_port_20=YES
hide_ids=YES
pasv_min_port=<span style="color: #cc66cc;">50000</span>
pasv_max_port=<span style="color: #cc66cc;">60000</span>
&nbsp;
xferlog_enable=YES
ls_recurse_enable=NO
ascii_download_enable=NO
async_abor_enable=YES
&nbsp;
one_process_model=NO
idle_session_timeout=<span style="color: #cc66cc;">120</span>
data_connection_timeout=<span style="color: #cc66cc;">300</span>
accept_timeout=<span style="color: #cc66cc;">60</span>
connect_timeout=<span style="color: #cc66cc;">60</span>
anon_max_rate=<span style="color: #cc66cc;">50000</span>
&nbsp;
anonymous_enable=NO
anon_upload_enable=NO
anon_mkdir_write_enable=NO
anon_other_write_enable=NO
anon_world_readable_only=NO
&nbsp;
ssl_enable=YES
force_local_logins_ssl=YES
force_local_data_ssl=YES
ssl_tlsv1=YES
ssl_sslv2=YES
ssl_sslv3=YES
rsa_cert_file=/usr/<a href="http://perldoc.perl.org/functions/local.html"><span style="color: #000066;">local</span></a>/etc/vsftpd.pem
rsa_private_key_file=/usr/<a href="http://perldoc.perl.org/functions/local.html"><span style="color: #000066;">local</span></a>/etc/vsftpd.pem</pre>
<p>start service</p>
<pre>/usr/local/libexec/vsftpd /usr/local/etc/vsftpd.conf &</pre>
<p>ทุกครั้งที่จะ restart service ก็ให้ kill process ทิ้งก่อน (เพราะเรารันแบบ stand alone)<br />
ลองใช้ ftp client connect ดูถ้าเราใช้ ssl ด้วยก็ให้เลือก FTPES - FTP over explicit TLS/SSL<br />
แนะนำ <a href="http://filezilla-project.org/download.php">Filezilla</a> ถ้ายังไม่สำเร็จให้ลอง</p>
<pre>ssl_enable=NO</pre>
<p>ไปก่อนแล้ว connect ที่ port 21 ตามปกติ</p>
<p><map name='google_ad_map_496_f21c57aff87a446f'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/496?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_496_f21c57aff87a446f' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=496&amp;url= http%3A%2F%2Fsixhead.com%2F2009%2F09%2F04%2Finstall-vsftp-and-ssl%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://sixhead.com/2009/09/04/install-vsftp-and-ssl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

