ProFTPD waiting time

Discussion in 'Server Operation' started by Captain, Feb 11, 2009.

  1. Captain

    Captain Member

    Hello!

    When I connect to my ftp (ProFTPD) its need wait long time (10-15 sec.) to connect. But after connection all work ok.
    Can you help me to solve this problem?

    Thanks!
     
  2. edge

    edge Active Member Moderator

  3. Captain

    Captain Member

    SSH works ok! Very fast connection. But ftp connection is slow. Slow only connection to server, after that all works ok. All directories opens very fast.
    I have hosting server (ubuntu 8.10 server + ISPConfig).
    I have hardware router. Server has local IP. Router forward my real IP to local server IP. All ports (21, 80, 81 ...) in hardware router is opened.

    It is my iptables -L

    Code:
    Chain INPUT (policy DROP)
    target     prot opt source               destination
    DROP       tcp  --  anywhere             loopback/8
    ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
    ACCEPT     all  --  anywhere             anywhere
    DROP       all  --  BASE-ADDRESS.MCAST.NET/4  anywhere
    PUB_IN     all  --  anywhere             anywhere
    PUB_IN     all  --  anywhere             anywhere
    PUB_IN     all  --  anywhere             anywhere
    PUB_IN     all  --  anywhere             anywhere
    DROP       all  --  anywhere             anywhere
    
    Chain FORWARD (policy DROP)
    target     prot opt source               destination
    ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
    DROP       all  --  anywhere             anywhere
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination
    PUB_OUT    all  --  anywhere             anywhere
    PUB_OUT    all  --  anywhere             anywhere
    PUB_OUT    all  --  anywhere             anywhere
    PUB_OUT    all  --  anywhere             anywhere
    
    Chain INT_IN (0 references)
    target     prot opt source               destination
    ACCEPT     icmp --  anywhere             anywhere
    DROP       all  --  anywhere             anywhere
    
    Chain INT_OUT (0 references)
    target     prot opt source               destination
    ACCEPT     icmp --  anywhere             anywhere
    ACCEPT     all  --  anywhere             anywhere
    
    Chain PAROLE (9 references)
    target     prot opt source               destination
    ACCEPT     all  --  anywhere             anywhere
    
    Chain PUB_IN (4 references)
    target     prot opt source               destination
    ACCEPT     icmp --  anywhere             anywhere            icmp destination-unreachable
    ACCEPT     icmp --  anywhere             anywhere            icmp echo-reply
    ACCEPT     icmp --  anywhere             anywhere            icmp time-exceeded
    ACCEPT     icmp --  anywhere             anywhere            icmp echo-request
    PAROLE     tcp  --  anywhere             anywhere            tcp dpt:ftp
    PAROLE     tcp  --  anywhere             anywhere            tcp dpt:ssh
    PAROLE     tcp  --  anywhere             anywhere            tcp dpt:smtp
    PAROLE     tcp  --  anywhere             anywhere            tcp dpt:domain
    PAROLE     tcp  --  anywhere             anywhere            tcp dpt:www
    PAROLE     tcp  --  anywhere             anywhere            tcp dpt:81
    PAROLE     tcp  --  anywhere             anywhere            tcp dpt:pop3
    PAROLE     tcp  --  anywhere             anywhere            tcp dpt:imap2
    PAROLE     tcp  --  anywhere             anywhere            tcp dpt:https
    ACCEPT     udp  --  anywhere             anywhere            udp dpt:domain
    DROP       icmp --  anywhere             anywhere
    DROP       all  --  anywhere             anywhere
    
    Chain PUB_OUT (4 references)
    target     prot opt source               destination
    ACCEPT     all  --  anywhere             anywhere
    
    netstat -tap

    Code:
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    tcp        0      0 *:tcpmux                *:*                     LISTEN      21170/portsentry
    tcp        0      0 *:20034                 *:*                     LISTEN      21170/portsentry
    tcp        0      0 *:32771                 *:*                     LISTEN      21170/portsentry
    tcp        0      0 *:32772                 *:*                     LISTEN      21170/portsentry
    tcp        0      0 *:40421                 *:*                     LISTEN      21170/portsentry
    tcp        0      0 *:32773                 *:*                     LISTEN      21170/portsentry
    tcp        0      0 *:32774                 *:*                     LISTEN      21170/portsentry
    tcp        0      0 *:31337                 *:*                     LISTEN      21170/portsentry
    tcp        0      0 *:mysql                 *:*                     LISTEN      4534/mysqld
    tcp        0      0 *:ircd                  *:*                     LISTEN      21170/portsentry
    tcp        0      0 *:systat                *:*                     LISTEN      21170/portsentry
    tcp        0      0 *:5742                  *:*                     LISTEN      21170/portsentry
    tcp        0      0 *:sunrpc                *:*                     LISTEN      21170/portsentry
    tcp        0      0 *:finger                *:*                     LISTEN      21170/portsentry
    tcp        0      0 *:netstat               *:*                     LISTEN      21170/portsentry
    tcp        0      0 *:54320                 *:*                     LISTEN      21170/portsentry
    tcp        0      0 *:sieve                 *:*                     LISTEN      21170/portsentry
    tcp        0      0 *:www                   *:*                     LISTEN      5370/apache2
    tcp        0      0 *:27665                 *:*                     LISTEN      21170/portsentry
    tcp        0      0 *:81                    *:*                     LISTEN      5342/ispconfig_http
    tcp        0      0 *:ingreslock            *:*                     LISTEN      21170/portsentry
    tcp        0      0 myhost.domain:domain *:*                     LISTEN      12091/named
    tcp        0      0 localhost.locald:domain *:*                     LISTEN      12091/named
    tcp        0      0 *:ssh                   *:*                     LISTEN      4444/sshd
    tcp        0      0 *:nntp                  *:*                     LISTEN      21170/portsentry
    tcp        0      0 *:socks                 *:*                     LISTEN      21170/portsentry
    tcp        0      0 *:smtp                  *:*                     LISTEN      22128/master
    tcp        0      0 *:12345                 *:*                     LISTEN      21170/portsentry
    tcp        0      0 localhost.localdoma:953 *:*                     LISTEN      12091/named
    tcp        0      0 *:12346                 *:*                     LISTEN      21170/portsentry
    tcp        0      0 *:635                   *:*                     LISTEN      21170/portsentry
    tcp        0      0 *:https                 *:*                     LISTEN      5370/apache2
    tcp        0      0 *:49724                 *:*                     LISTEN      21170/portsentry
    tcp        0      0 *:uucp                  *:*                     LISTEN      21170/portsentry
    tcp        0      0 myhost.domain:ssh 192.168.123.110:1195    ESTABLISHED 3164/0
    tcp6       0      0 [::]:imaps              [::]:*                  LISTEN      4858/couriertcpd
    tcp6       0      0 [::]:pop3s              [::]:*                  LISTEN      4906/couriertcpd
    tcp6       0      0 [::]:pop3               [::]:*                  LISTEN      4879/couriertcpd
    tcp6       0      0 [::]:imap2              [::]:*                  LISTEN      4827/couriertcpd
    tcp6       0      0 [::]:ftp                [::]:*                  LISTEN      21878/proftpd: (acc
    tcp6       0      0 [::]:ssh                [::]:*                  LISTEN      4444/sshd
    tcp6       0      0 [::]:smtp               [::]:*                  LISTEN      22128/master
    tcp6       0      0 localhost:953           [::]:*                  LISTEN      12091/named
    tcp6       0      0 myhost.domain:pop3 192.168.123.110%81:4210 TIME_WAIT   -
    tcp6       0      0 myhost.domain:pop3 200.200.100.200%8:60193 TIME_WAIT   -
    
    
     
    Last edited: Feb 11, 2009
  4. edge

    edge Active Member Moderator

    Did you add IdentLookups off to your proftpd.conf file? (as suggested in one of the posts)

    It should be within the <Global> </Global> option.
    After adding it, make sure you restart proftpd
    /etc/init.d/proftpd restart

    Also have a look here: http://www.howtoforge.com/forums/showthread.php?t=6447
     
    Last edited: Feb 11, 2009
  5. Captain

    Captain Member

    Big thanks! Works great!
     

Share This Page