首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >在不同端口同时运行ftp/ftes ftps和sftp的Proftpd配置

在不同端口同时运行ftp/ftes ftps和sftp的Proftpd配置
EN

Server Fault用户
提问于 2014-01-30 09:48:35
回答 1查看 9.8K关注 0票数 4

我已经用ftp、ftps、sftp和mysql身份验证编译了proftpd 1.3.4d。

到目前为止,我可以同时完成端口210ftpftpes以及端口211 sftp的工作。

代码语言:javascript
运行
复制
ServerName                      "ProFTPD self contained package"
ServerType                      inetd
Port                            211
UseIPv6                         off
Umask                           022
User                    nobody
Group                   nobody
allowOverwrite          on
SystemLog                       none

<Limit SITE_CHMOD>
  DenyAll
</Limit>

<Global>
DefaultRoot ~
</Global>

<VirtualHost 0.0.0.0>
       Port 210
       SQLUserWhereClause              " (allowed = 'both' OR allowed = 'ftp') "
</VirtualHost>

<IfModule mod_sftp.c>
  <VirtualHost 0.0.0.0>
        SFTPEngine on
        SFTPLog  none
        Port 211
        SFTPHostKey /etc/ssh/ssh_host_dsa_key
        SFTPHostKey /etc/ssh/ssh_host_rsa_key
        SFTPAuthorizedUserKeys file:../etc/ssh/authorized_keys
        SQLUserWhereClause              " (allowed = 'both' OR allowed = 'sftp') "
        SFTPCompression delayed
        MaxLoginAttempts 6
  </VirtualHost>
</IfModule>

<IfModule mod_dso.c>
    LoadModule mod_tls.c
</IfModule>

<IfModule mod_tls.c>    
    TLSEngine on
    TLSLog /usr/local/proftpd/var/log/etls.log
    TLSRequired on
    TLSRSACertificateFile /usr/local/proftpd/etc/proftpd.cert.pem
    TLSRSACertificateKeyFile /usr/local/proftpd/etc/proftpd.key.pem
    TLSVerifyClient off
    TLSRenegotiate none
    TLSProtocol SSLv3 TLSv1
</IfModule>

这是我不想做的事情,wis添加了这样一个VirtualHost:

代码语言:javascript
运行
复制
<VirtualHost 0.0.0.0>
       Port 214
       TLSOptions UseImplicitSSL
</VirtualHost>

当我尝试新的虚拟主机时,要让虚拟主机只接受ftps,它根本不能工作,而ftpftpesftps几乎可以工作,但不能完成身份验证。

我的问题是,首先,您是否对我的配置有评论(但这是可选的)。

不,真正的问题是

是我正在努力实现的目标,如果可能的话,如何实现?

EN

回答 1

Server Fault用户

回答已采纳

发布于 2014-01-31 08:54:24

这是可能的,下面是我的配置文件:

代码语言:javascript
运行
复制
#-----------------------------------------------------------------------
# Server Configuration: those parameters cannot be elsewhere
#-----------------------------------------------------------------------
ServerName                          "ftp daemon"
ServerType                          inetd
UseIPv6                             off

# Bar use of SITE CHMOD by default
<Limit SITE_CHMOD>
        DenyAll
</Limit>

SystemLog                           none
LogFormat                           authentication "%{%F %T}t %P  from: %a to: %{protocol}:%H:%p  user: %U       msg: %S"
LogFormat                           transfer       "%{%F %T}t %P  from: %a to: %{protocol}:%H:%p  user: %U       file: %f        cmd: %m %J"

ScoreboardFile                      /local/proftpd/var/proftpd.scoreboard


TLSProtocol                         SSLv3 TLSv1

<Global>
    #-----------------------------------------------------------------------
    # Generic Configuration
    #-----------------------------------------------------------------------
    DefaultRoot                         ~
    Umask                               022
    allowOverwrite                      on
    User                                nobody
    Group                               nobody
    ExtendedLog                         /var/log/proftpd_auth.log AUTH,EXIT,SEC authentication
    ExtendedLog                         /var/log/proftpd_xfer.log READ,WRITE transfer
    AuthOrder                           mod_sql.c mod_auth_unix.c mod_auth_pam.c

    #-----------------------------------------------------------------------
    # TLS Configuration
    #-----------------------------------------------------------------------
    TLSEngine                                               off
    TLSRSACertificateFile           /usr/local/proftpd/etc/proftpd.cert.pem
    TLSRSACertificateKeyFile        /usr/local/proftpd/etc/proftpd.key.pem
    TLSLog                                                  none
    TLSVerifyClient                                 off
    TLSRenegotiate                                  none
    TLSRequired                                     off
</Global>

# -----------------------------------------------------------------------------
#    __ _              __   __ _         _____ _____                    __
#   / _| |            / /  / _| |       |  ___/  ___|                  / _|
#  | |_| |_ _ __     / /  | |_| |_ _ __ | |__ \ `--.    ___ ___  _ __ | |_
#  |  _| __| '_ \   / /   |  _| __| '_ \|  __| `--. \  / __/ _ \| '_ \|  _|
#  | | | |_| |_) | / /    | | | |_| |_) | |___/\__/ / | (_| (_) | | | | |
#  |_|  \__| .__/ /_/     |_|  \__| .__/\____/\____/   \___\___/|_| |_|_|
#          | |                    | |
#          |_|                    |_|
# -----------------------------------------------------------------------------
<VirtualHost 0.0.0.0>
    Port                                    210
    TLSEngine                               on
</VirtualHost>

# -----------------------------------------------------------------------------
#    __ _         _____                    __
#   / _| |       /  ___|                  / _|
#  | |_| |_ _ __ \ `--.    ___ ___  _ __ | |_
#  |  _| __| '_ \ `--. \  / __/ _ \| '_ \|  _|
#  | | | |_| |_) /\__/ / | (_| (_) | | | | |
#  |_|  \__| .__/\____/   \___\___/|_| |_|_|
#          | |
#          |_|
# -----------------------------------------------------------------------------
<VirtualHost 0.0.0.0>
    Port                                    214
    TLSEngine                               on
    TLSOptions                              UseImplicitSSL
</VirtualHost>

# -----------------------------------------------------------------------------
#   _____  __ _                            __
#  /  ___|/ _| |                          / _|
#  \ `--.| |_| |_ _ __     ___ ___  _ __ | |_
#   `--. \  _| __| '_ \   / __/ _ \| '_ \|  _|
#  /\__/ / | | |_| |_) | | (_| (_) | | | | |
#  \____/|_|  \__| .__/   \___\___/|_| |_|_|
#                | |
#                |_|
# -----------------------------------------------------------------------------
<IfModule mod_sftp.c>
    <VirtualHost 0.0.0.0>
        Port                                    211
        SFTPEngine                              on
        SFTPLog                                 none
        SFTPHostKey                     /etc/ssh/ssh_host_dsa_key
        SFTPHostKey                     /etc/ssh/ssh_host_rsa_key
        SFTPAuthorizedUserKeys  file:../etc/ssh/authorized_keys
        SFTPCompression                 delayed
        MaxLoginAttempts                6
    </VirtualHost>
</IfModule>  
票数 5
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/570961

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档