FTPFirewall and Nonstandard Port
Keywords: FTPFirewall
Question:
I am confused on using the ftpFirewall command to connect to non-standard ports. I am trying to write a script that connects to several ftpsites. Some are normal port 21 and some are port 5000 here is what I was trying to do...ftpFireWall(1,ftpaddr,ftpport,"","") hSession=ftpOpen(ftpaddr,ftpid,ftppass,"",1) if !IsNumber(hSession) ErrText = "FTP Open Error:%hSession%" Goto SendError exit endifNow I am filling ftpaddr and ftpport within a loop and reading from and ini file. None of them actually go through a proxy server. However when I connect to my first site I get:FTP Open Error:999 Login Failed - ANow the first site is a port21 site can I not use ftpFireWall to connect to a port21 site? (Note: it DOES work if I comment out the FireWall Step but I need it for further down).
Answer:
I think if you use firewall type 1, then you need to put the userid/password in the ftpfirewall command.Question (cont'd):
Thanks for pointing me in the right direction. Switched to type 0 and all seems well!Here is the final code:
ftpFireWall(0,ftpaddr,ftpport,"","")Answer:
I'm not sure type 0 will work for non-21 ports... It turns it off.
Related Question:
Using the winsock extender's ftp commands, is there a way to change from port 21 to another port? We looked and don't see port as a parameter except for the firewall command and we don't have a firewall.Answer:
I've used the firewall command to do stuff like that even without a fireewall. Use proxy protocol 1 and fill in all the other information.
Article ID: W12645Filename: FTPFirewall and Nonstandard Port.txt