The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

ftp not allowing connections on port 21

Discussion in 'General Discussion' started by ooootv, Aug 9, 2004.

  1. ooootv

    ooootv Member

    Joined:
    Aug 9, 2004
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    san francisco
    I'm not sure if this has anything to do with WHM or Cpanel but I'd like to use it before editing the files manually to keep integretiy on the system.

    Right now I cannot login to ftp on port 21 but I can login to ftp using the secure port 22 with WinSCP. What could be the cause of this? In WHM's FTP controls I switched between proftp and pure-ftp. Neither would allow me to login on port 21.

    What is most interesting is it would appear that port 21 is blocked all together. I always get a time out error. It is a dedicated server so I have full control over the server settings. There is not a firewall at the datacenter blocking my port 21.

    Any ideas?

    Thanks for the help.
     
  2. OCX

    OCX Well-Known Member

    Joined:
    Sep 20, 2003
    Messages:
    232
    Likes Received:
    0
    Trophy Points:
    16
    are you behind a router/firewall?

    if so you might want to toggle pasv mode on or off..

    or
    pico /etc/proftpd.conf

    make sure the ports are set properly


    heres what typically your setup should look like

    ---------------------------------------------------------
    ServerName "ProFTPD"
    AuthUserFile /etc/proftpd/passwd.vhosts
    LogFormat BytesLog "%b"
    ServerType standalone
    DeferWelcome off
    DefaultServer on
    DefaultRoot ~ !wheel
    UseReverseDNS off
    IdentLookups off
    TimeoutNoTransfer 300
    TimeoutIdle 1200
    TimeoutLogin 120
    TimeoutStalled 600

    <Global>
    IdentLookups off
    AllowStoreRestart on
    </Global>
    # Port 21 is the standard FTP port.

    <IfModule mod_tls.c>
    TLSEngine on
    TLSProtocol TLSv1
    TLSRequired off
    TLSRSACertificateFile /etc/ftpd-rsa.pem
    TLSRSACertificateKeyFile /etc/ftpd-rsa-key.pem
    TLSVerifyClient off
    </IfModule>
    Port 21

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

    if you make changes to this conf
    besure to restart the service

    service xinetd restart
     
  3. ooootv

    ooootv Member

    Joined:
    Aug 9, 2004
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    san francisco
    Thanks for the reply. I'm calling my hosting company to find out about a possible firewall.

    I did a "nmap localhost" and ports 21,22 are both open. I can't understand why I can ftp securely on 22 but not non-secure on port 21.

    My proftpd.conf file is very similar with yours and has all the <virtual host> listed as well as the correct /auth/passwd.vhost file which seems to have the right values.

    Everytime I try to connect I get a timeout like the server is blocking the port all together.

    I should add the following. When I connect on 22 I'm using WinSCP. If I use a program like WS_FTP Pro I cannot connect using ftp.mydomain.com on either ports 21 or ports 22 passive mode or non-passive mode.

    Even more interesting. If I ping ftp.mydomain.com I get nothing back. I also tested the ping for other servers I have and it worked for them. So maybe this is another issue?
     
    #3 ooootv, Aug 10, 2004
    Last edited: Aug 10, 2004
Loading...

Share This Page