update:
2008.09.05 - prxs (PRoFTPD EXtensionS) 가 cvs에 추가됨
2009.04.21 -  ProFTPD - mod_tls with CCC (Clear Command Channel) 문서 링크 추가


1. 소개


http에 ssl을 이용한 https가 있듯이 ftp에도 ssl을 이용한 FTPS (FTP over SSL/TLS)가 있습니다.
ftps에 대해 기술되어 있는 rfc4217의 링크입니다.
http://www.faqs.org/rfcs/rfc4217.html

2. 설치

proftpd에서는 ftps를 지원하는 mod_tls가 있습니다. mod_tls는 proftpd 1.2.x이상에서 지원하고 기본으로 포함되지 않습니다.
즉 이미 proftpd가 설치되어 있다면 mod_tls를 다시 집어넣고 proftpd를 다시 컴파일해야 한다는 거죠.
shared 모듈로 설치하고자 한다면 configure시  --with-shared=mod_tls를 추가후 컴파일하면 됩니다.

또는 김정균님이 운영하는 http://oops.org 에서 배포하는 proftpd를 설치했다면 기본으로 설치가 됩니다.
proftpd의 설정파일에 한글설명도 포함되어 있습니다. 편리한쪽으로 사용하시면 되겠습니다. Array

proftpd roadmap에 따르면 apache서버의 apxs처럼 원소스가 없어도 특정모듈을 proftpd설치이후 추가로
설치할수 있게 할 예정이라고 합니다. 빨리 안정버전에 포함되었으면 좋겠네요.


% cvs를 확인해보니 며칠전에 추가되었네요!Array
파일명이 prxs (PRoFTPD EXtensionS)군요. apache에서 사용하는 apxs와 비슷(proftpd의 모토가 like apache라 역시나)
하네요.

mod_tls에서 사용되는 인증서도 웹서버에서 사용되는 인증서와 마찬가지로 자체서명인증으로 테스트 해볼수 있습니다.
http://free4u.wo.tc/9813

3. 설정

proftpd tls mini howto : http://www.castaglia.org/proftpd/doc/contrib/ProFTPD-mini-HOWTO-TLS.html
proftpd mod_tls : http://www.castaglia.org/proftpd/modules/mod_tls.html

아래설정은 proftpd tls mini howto인데 위링크와 몇가지 다른점이 있으니 참고하시기 바랍니다.

Example mod_tls configuration:

 <IfModule mod_tls.c>
    TLSEngine on
TLSLog /path/to/logfile
# TLSProtocol은 SSLv2를 제외한 SSLv1과 SSLv3를 사용한다.
# SSLv2의 경우 Processing Buffer Overflow로 인해 사용을 권장하지 않는다.
# 참고링크:
http://secunia.com/advisories/24253/
# sslv1과 sslv3를 동시 지원하기 위해 아래처럼 설정한다.
TLSProtocol SSLv23

# Are clients required to use FTP over TLS when talking to this server?
TLSRequired off
# 몇몇 ftp client의 문제로 인해 설정해둠.
TLSOptions NoCertRequest

# Server's certificate
# 아래설정은 웹서버의 ssl인증을 위해 만들어둔 키파일을 가져다 사용할수 있다.
# 자체서명인증도 사용가능
TLSRSACertificateFile /pat/to/server.cert.pem
TLSRSACertificateKeyFile /path/to/server.key.pem
# CA the server trusts
TLSCACertificateFile /path/to/root.cert.pem
# Authenticate clients that want to use FTP over TLS?
TLSVerifyClient off
# Allow SSL/TLS renegotiations when the client requests them, but
# do not force the renegotations. Some clients do not support
# SSL/TLS renegotiations; when mod_tls forces a renegotiation, these
# clients will close the data connection, or there will be a timeout
# on an idle data connection.
TLSRenegotiate required off
</IfModule>

4. 설정확인
아래 그림(?)은 FTPS (FTP over SSL/TLS)를 지원하는 ftp client에서 auth_tls 또는 명시적
FTPS - FTP/SSL (Explicit) 설정후 접속한 화면입니다.
ftp client마다 다른이름으로 설정하게 되어 있으니 확인후 테스트 해보셔야 할것 같습니다.

auth_tls.jpg


FTPS (FTP over SSL/TLS)를 지원하는 ftp client 목록은 아래링크에서 확인할수 있습니다.
http://www.ford-hutchinson.com/~fh-1-pfh/ftps-ext.html#client


FTPS의 경우 서버 설정 혹은 ftp client설정에 따라 control(auth) channel또는 data channel로 분리해 ssl연결을
적용하는 방법도 가능한데 그부분은 아래 링크의 글을 참고하세요.

 ProFTPD - mod_tls with CCC ( Clear Command Channel )


+ Recent posts