Link to home
Start Free TrialLog in
Avatar of Allan_Fernandes
Allan_Fernandes

asked on

FTP Server on DDNS Machine

One of my Client has a DDNS (Dynamic DNS) machine and I can connect to it via the name / temporary IP via Sockets.
I can also transfer messages via the Socket connection.
To transfer files I want to use the FTP Protocol but it did not work.
Any suggestions as to what may be minimum requirements for transfer files via FTP on DDNS.
Avatar of Kimputer
Kimputer

There are no real minimum requirements. What are the error messages you see on the server console? What error messages do you see on the client console?
If the machine is behind a firewall, check and confirm that the FTP port is forwarded to the machine in question, and that the FTP port is not firewalled.

If the system is linux, confirm that an FTP server is installed and is listening on port 21 as shown by netstat.
Avatar of Allan_Fernandes

ASKER

Sorry client will be open only on Monday. Will get back then
Following are the FtpServer and FtpClient logs. Please note that if I load the FTP Client on the same machine then it works fine.

FTP Server Logs
……
…..
! 111.11.111.11 connected
< 111.11.111.11 USER ABC
! Opening Accounts File: c:\XYZserver\ftpFls.ini
> 111.11.111.11 331 Password required for ABC.
< 111.11.111.11 PASS ABC
! 111.11.111.11=ABC is authenticated
! 111.11.111.11=ABC Home Directory: C:\FtpUpload\
> 111.11.111.11 230 User ABC logged in.
< 111.11.111.11 TYPE I
> 111.11.111.11 200 Type set to I.
< 111.11.111.11 SYST
> 111.11.111.11 215 UNIX Type: L8 ICS
< 111.11.111.11 FEAT
> 111.11.111.11 211-Extensions supported:
 HOST
 SIZE
 REST STREAM
 MDTM
 MDTM YYYYMMDDHHMMSS[+-TZ] filename
 MLST size*;type*;perm*;create*;modify*;
 MFMT
 MD5
 XCRC "filename" start end
 XMD5 "filename" start end
 CLNT
 SITE INDEX;ZONE;CMLSD;DMLSD
 MODE Z
 XCMLSD
 XDMLSD
 UTF8
 LANG EN*
 OPTS MODE;UTF8;
 AUTH TLS;SSL;
 CCC
 PROT C;P;
 PBSZ
211 END
< 111.11.111.11 PASV
> 111.11.111.11 227 Entering Passive Mode (222,222,2,222,222,222).


FTP Client Logs

  PutFile:
    DllDate: 2012
    Username: MSERVER:Admin
    Architecture: Little Endian; 32-bit
    Language: C++ Builder XE2
    VerboseLogging: 0
    LocalFilename: c:\XYZ\XYZ.chm
    RemoteFilename: FtpUploadTest.Chm
    ProgressMonitoring:
      enabled: yes
      heartbeatMs: 0
      sendBufferSize: 65536
    --ProgressMonitoring
    IdleTimeoutMs: 60000
    ReceiveTimeoutMs: 60000
    ConnectTimeoutSeconds: 60
    initialGreeting: 220-Welcome to my Server
220-
220 ABC FTP Server ready.
    restartNext: 0
    ModeZ: 0
    BinaryMode: 1
    Passive transfer mode
    setupPassiveDataSocket3:
      hostAddr: 222.222.2.222
      DataConnect:
        hostname: 222.222.2.222
        port: 55173
        ConnectTimeoutMs_1: 60000
        calling ConnectSocket2
        IPV6 enabled connect with NO heartbeat.
        This is an IPV4 numeric address...
        AddrInfoList:
          AddrInfo:
            ai_flags: 4
            ai_family: 2
            ai_socktype: 1
            ai_protocol: 0
            ai_addrlen: 16
            ai_canonname: (NULL)
          --AddrInfo
        --AddrInfoList
        Connect using IPV4.
        ipAddress1: 222.222.2.222
        timeout waiting for connect to complete
        numSec: 15
        numMicroSec: 958000
        Connect function failed..
        SocketError: WSAEWOULDBLOCK The socket would block.
      --DataConnect
      Try setting the PassiveUseHostAddr property = true
      setupPassiveDataSocket dataConnect failed.
    --setupPassiveDataSocket3
    SetupPassiveDataSocket: Elapsed time: 60232 millisec
    Failed to setup passive data socket for PutFile
    TotalTime: Elapsed time: 60232 millisec
    Failed.
  --PutFile
Since you get some response from the server/client, it means you have a problem with the passive ports in the  firewall.
You have to find the settings for passive ports in your FTP server configuration, then select about 100 ports (for example, ports 21000 through 21100), then use the port range forward settings in your firewall/router, and make sure that as an EXTRA to the port 21 you already forwarded, to also forward ports 21000 through 21100 to that same server IP.
The next step would be to provide us with your FTP server (vendor/version), or to possibly think about using Filezilla Server (for its security feature, easy user interface, with settings easy to understand and configure).
FileZilla FTP Server seems to be free or does it have any limitations ?
What exactly do you mean by saying forward the ports 21000...
Is it that I tell my customer to open those ports ?
ASKER CERTIFIED SOLUTION
Avatar of Kimputer
Kimputer

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for the simple and to the point explanations