Re: winsock and FTP app

Tech-Archive recommends: Fix windows errors by optimizing your registry



Ok, so I got some things sorted out, but I'm still having trouble opening the data connection. Here's some more info:

wsCommand
 .RemotePort = 21
 .RemoteHost = xxxxxxx.ca '(This connection works)
 .LocalPort = 0

wsData
 .RemotePort = 20
 .RemoteHost = xxxxxxx.ca '(Same as wsCommand)
 .LocalPort = yy

I set yy to the PORT command port number, eg: 192,168,55,111,4,42 is
4 * 256 + 42 = 1066

So I connect, user xxx, pass xxx, port 192,168,55,111,4,42

Everything up to here is ok. What should I be doing in my code after I send the PORT command?

PS Oddly enough I got this much farther by looking in the MS Windows Help files. Shhh, don't tell anyone. ;)

Paul

Paul E Mak wrote:
I'm trying to write an app that will dump the contents of a memory card (whole drive) to a root account on an ftp server. I have a basic ftp program working except for the data connection. Now I don't know how (MS) ftp.exe seems to get my PORT number, (because I'm behind a firewall), but it does and LIST, GET, PUT, etc all work fine. In my app, I can't get LIST, STOR, RETR etc working because I can't get the data connection set up correctly. I'm assuming it's because I don't have the right PORT number. So the question is, how can I get my WAN IP from within VB6, (the LOCALIP just gives me my LAN IP) for the PORT command to use? The alternate question is, am I looking at the wrong thing/what else am I doing wrong?

Paul


.



Relevant Pages

  • Re: Correction
    ... Normally to physically disconnect is just a matter of reaching for the ... >> I have an ADSL connection which polls my computer from time to time, ... > disallow each and every port with Windows Firewall? ...
    (microsoft.public.windowsxp.messenger)
  • Re: Using Remote Desktop From an SBS Domain
    ... when you tried to RDP while attached directly to a port on your router? ... Internet to initiate an IP conversation with your computer. ... This situation is different than if you ran your own NAT connection sharing ...
    (microsoft.public.windows.server.sbs)
  • Re: Still cant connect to RWW or OWA remotely
    ... it certainly appears to be something about the SBS configuration. ... Meridian.local Ethernet adapter Local Area Connection: ... Windows SMALL BUSINESS SERVER 2003 Windows IP Configuration ... 192.168.254.254) directly to a port on the router and then ...
    (microsoft.public.windows.server.sbs)
  • Re: Still cant connect to RWW or OWA remotely
    ... it certainly appears to be something about the SBS configuration. ... Meridian.local Ethernet adapter Local Area Connection: ... Windows SMALL BUSINESS SERVER 2003 Windows IP Configuration ... 192.168.254.254) directly to a port on the router and then ...
    (microsoft.public.windows.server.sbs)
  • Re: Random unprivileged TCP ports below 5000 kind-of open for a fraction of a second
    ... When Nmap (or many ... > other applications, such as Telnet) does a connectcall, the OS is ... > supposed to choose a good souce port to bind to for the connection. ... I saw a familiar "Connection reset by peer" every time the random port ...
    (Incidents)