Setting Up ProFTPd + TLS On Debian Lenny

Discussion in 'HOWTO-Related Questions' started by wiseman, Dec 9, 2010.

  1. wiseman

    wiseman New Member

    This is a very strange howto it was done sometime ago
    and since I have followed it what should I do next


    PLEASE REMEMBER also that you say

    cp /etc/proftpd/tls.conf /etc/proftpd/tls.conf_orig
    cat /dev/null > /etc/proftpd/tls.conf
    vi /etc/proftpd/tls.conf

    how can you vi a conf file that is not there?

    this is FOLLOWED by the conf.tls file

    ok Falk maybe its my mistake but here is what I get

    status: Connection established, waiting for welcome message...
    Response: 220 FTP Server ready.
    Command: AUTH TLS
    Response: 500 AUTH not understood
    Command: AUTH SSL
    Response: 500 AUTH not understood

    maybe aptitude remove --purge ftpd openssl
    and then
    aptitude install ftpd opennssl
    and then follow
    How To Configure PureFTPd To Accept TLS Sessions On Debian Lenny?



    thankyou
    wiseman
     
    Last edited: Dec 10, 2010
  2. falko

    falko Super Moderator ISPConfig Developer

    vi creates the file if it doesn't exist.
     
  3. wiseman

    wiseman New Member

    thankyou woks fine now
    but
    how is possible who is this??????
    I have a strict tls connextion


    tcp 0 0 wiseman.mydomain.at:ftp 91.137.22.29:47600 ESTABLISHED?
     
    Last edited: Dec 11, 2010
  4. falko

    falko Super Moderator ISPConfig Developer

    Yes, but it still uses the FTP port. :ftp just means :21 (port 21); it is shown as :ftp because in /etc/services ftp is mapped to port 21.
     
  5. wiseman

    wiseman New Member

    my question is

    tcp 0 0 selfless.mydomain.at:ftp 91.137.22.29:47976 ESTABLISHED

    I do not know who 91.137.22.29 is?/

    also how can i configure ftp so that it allows only connections from
    my ip address?



    wiseman:)
     
    Last edited: Dec 12, 2010
  6. falko

    falko Super Moderator ISPConfig Developer

  7. wiseman

    wiseman New Member

    I do not understand of course it is NOT my
    my ip starts 81. and so on

    how someone can access my box on ftp is very worring


    wisseman:rolleyes:
     
  8. falko

    falko Super Moderator ISPConfig Developer

    Do you allow anonymous FTP sessions?
     
  9. wiseman

    wiseman New Member

    I do not know all I did was to follow the howto
    what else can be done to stop this?

    wiseman
     
  10. falko

    falko Super Moderator ISPConfig Developer

    Can you post your proftpd.conf?

    If you want to stop break-in attempts, please install fail2ban.
     
  11. wiseman

    wiseman New Member

    Here is the proftpd.conf file
    BUT FIRST you may want to read this

    http://evilzone.org/2010/11/proftpd-remote-root-exploit/
    and
    http://bugs.proftpd.org/show_bug.cgi?id=3521

    i am running ProFTPD Version 1.3.1

    might be a possible hack in this case fail2ban might not help
    I have done a fresh install today please tell me which howto to follow for ftp /tls
    OR follow Virtual Hosting With vsftpd And MySQL On Debian Lenny, but only install vsftpd and confiure as per the howto?

    ----------------------------------------------

    GNU nano 2.0.7 File: proftpd.conf

    #
    # /etc/proftpd/proftpd.conf -- This is a basic ProFTPD configuration file.
    # To really apply changes reload proftpd after modifications.
    #

    # Includes DSO modules
    Include /etc/proftpd/modules.conf

    # Set off to disable IPv6 support which is annoying on IPv4 only boxes.
    UseIPv6 on
    # If set on you can experience a longer connection delay in many cases.
    IdentLookups off

    ServerName "Debian"
    ServerType standalone
    DeferWelcome off

    MultilineRFC2228 on
    DefaultServer on
    ShowSymlinks on

    TimeoutNoTransfer 600
    TimeoutStalled 600
    TimeoutIdle 1200

    DisplayLogin welcome.msg
    DisplayChdir .message true
    ListOptions "-l"

    DenyFilter \*.*/

    # Use this to jail all users in their homes
    DefaultRoot ~
    IdentLookups off
    ServerIdent on "FTP Server ready."

    # Users require a valid shell listed in /etc/shells to login.
    # Use this directive to release that constrain.
    # RequireValidShell off

    # Port 21 is the standard FTP port.
    Port 21

    # In some cases you have to specify passive ports range to by-pass
    # firewall limitations. Ephemeral ports can be used for that, but
    # feel free to use a more narrow range.
    # PassivePorts 49152 65534

    # If your host was NATted, this option is useful in order to
    # allow passive tranfers to work. You have to use your public
    # address and opening the passive ports used on your firewall as well.
    # MasqueradeAddress 1.2.3.4

    # This is useful for masquerading address with dynamic IPs:
    # refresh any configured MasqueradeAddress directives every 8 hours
    <IfModule mod_dynmasq.c>
    # DynMasqRefresh 28800
    </IfModule>

    # To prevent DoS attacks, set the maximum number of child processes

    # to 30. If you need to allow more than 30 concurrent connections
    # at once, simply increase this value. Note that this ONLY works
    # in standalone mode, in inetd mode you should use an inetd server
    # that allows you to limit maximum number of processes per service
    # (such as xinetd)
    MaxInstances 30

    # Set the user and group that the server normally runs at.
    User proftpd
    Group nogroup

    # Umask 022 is a good standard umask to prevent new files and dirs
    # (second parm) from being group and world writable.
    Umask 022 022
    # Normally, we want files to be overwriteable.
    AllowOverwrite on

    # Uncomment this if you are using NIS or LDAP via NSS to retrieve passwords:
    # PersistentPasswd off

    # This is required to use both PAM-based authentication and local passwords
    # AuthOrder mod_auth_pam.c* mod_auth_unix.c

    # Be warned: use of this directive impacts CPU average load!
    # Uncomment this if you like to see progress and transfer rate with ftpwho
    # in downloads. That is not needed for uploads rates.
    #
    # UseSendFile off

    TransferLog /var/log/proftpd/xferlog
    SystemLog /var/log/proftpd/proftpd.log

    <IfModule mod_quotatab.c>
    QuotaEngine off
    </IfModule>

    <IfModule mod_ratio.c>
    Ratios off
    </IfModule>

    # Users require a valid shell listed in /etc/shells to login.
    # Use this directive to release that constrain.
    # RequireValidShell off

    # Port 21 is the standard FTP port.

    # Delay engine reduces impact of the so-called Timing Attack described in
    # http://security.lss.hr/index.php?page=details&ID=LSS-2004-10-02
    # It is on by default.
    <IfModule mod_delay.c>
    DelayEngine on
    </IfModule>

    <IfModule mod_ctrls.c>
    ControlsEngine off
    ControlsMaxClients 2
    ControlsLog /var/log/proftpd/controls.log
    ControlsInterval 5
    ControlsSocket /var/run/proftpd/proftpd.sock
    </IfModule>

    <IfModule mod_ctrls_admin.c>
    AdminControlsEngine off
    </IfModule>

    #
    # Alternative authentication frameworks
    #
    #Include /etc/proftpd/ldap.conf
    #Include /etc/proftpd/sql.conf

    #
    # This is used for FTPS connections
    #
    Include /etc/proftpd/tls.conf

    # A basic anonymous configuration, no upload directories.

    # <Anonymous ~ftp>
    # User ftp
    # Group nogroup
    # # We want clients to be able to login with "anonymous" as well as "ftp"
    # UserAlias anonymous ftp
    # # Cosmetic changes, all files belongs to ftp user
    # DirFakeUser on ftp



    # DirFakeGroup on ftp
    #
    # RequireValidShell off
    #
    # # Limit the maximum number of anonymous logins
    # MaxClients 10
    #
    # # We want 'welcome.msg' displayed at login, and '.message' displayed
    # # in each newly chdired directory.
    # DisplayLogin welcome.msg
    # DisplayChdir .message
    #
    # # Limit WRITE everywhere in the anonymous chroot
    # <Directory *>
    # <Limit WRITE>
    # DenyAll
    # </Limit>
    # </Directory>
    #
    # # Uncomment this if you're brave.
    # # <Directory incoming>
    # # # Umask 022 is a good standard umask to prevent new files and dirs
    # # # (second parm) from being group and world writable.
    # # Umask 022 022
    # # <Limit READ WRITE>
    # # DenyAll
    # # </Limit>
    # # <Limit STOR>
    # # AllowAll
    # # </Limit>
    # # </Directory>
    #
    # </Anonymous>


    wiseman:)
     
    Last edited: Dec 20, 2010

Share This Page