LoginSignup
0
0

More than 5 years have passed since last update.

WebProxy配下でFTPS

Last updated at Posted at 2017-02-13

目的

WebProxy配下のFTPクライアントからFTPSを通したい

構成

client(lftp,curl)
|
WebProxy(squid)
|
FTPServer(proftpd)

各設定の抜粋

FTPServer

この辺りに書いてあることを参考にImplicitModeで待ち受けようとしたが
何かを間違えているのか、うまく動作せず。。
Explicitで待ち受け。
http://www.proftpd.org/docs/contrib/mod_tls.html

/usr/local/etc/proftpd.conf

<IfModule mod_tls.c>
# <VirtualHost FTPサーバのPrivateIPを設定した>
    TLSEngine on
    TLSRequired off
#    Port 990
    TLSLog  /var/log/proftpd/tls.log
    TLSProtocol TLSv1 TLSV1.2
    TLSCipherSuite ALL:HIGH:MEDIUM

    TLSRSACertificateFile /etc/pki/tls/certs/ftps.crt
    TLSRSACertificateKeyFile /etc/pki/tls/private/ftps.key
    TLSOptions NoCertRequest
    TLSVerifyClient off

# </VirtualHost>
</IfModule>

2.webProxy(Squid)

/etc/squid/squid.conf

acl SSL_ports port 21

3.client

~/.curlrc

cat << _EOF_ > ~/.curlrc
proxy="http://プロキシのPrivateIP:3128"
_EOF_

実行コマンド

・ls

curl --ftp-ssl -u FTPユーザ名:パスワード ftp://xx.xx.xx.xxx

proxyのログ

1487002892.132    324 xxx.xx.xx.xx TCP_MISS/200 5261 GET ftp://FTPユーザ名@xx.xxx.x.xxxx/ - DIRECT/xx.xxx.x.xxx text/html

・put

curl --ftp-ssl -u FTPユーザ名:パスワード -T "put_file_name" ftp://xxx.xxx.xx.xx -k

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0