Hmmm... not sure if this will help you, but perhaps I can shed some light on what the
message "Illegal port command" means.
When you connect do an "ls" or "get" command, your FTP client sets up a port on your
local machine to receive the information that the server will send to it. It opens a port,
starts listening for a TCP connection to that port. When FTP works correctly, the server
will send all of the requested data to that port, and then the client will close it.
In order to tell the server which port it wants the data delivered to, the FTP client
sends the server a "PORT" command. This command tells the server what IP address and port to make a connection to, in order to transfer your data.
Each time you do a different "ls" or "get" command, it sends a new PORT command,
and probably connects to a different port.
Its possible that your company's LAN is running a firewall or proxy that is blocking the
port that your copy of ncftp is trying to tell the server to send to. Its also possible that
there is a bug in your copy of ncftp (though, that seems a bit unlikely, IMHO)
In any case, theres something wrong with the IP address and port that your client
is telling the server to connect with.
One possible workaround would be to try using passive mode on your FTP
transfers... In this mode, the client makes the connection to the server, rather than
vice-versa. It might also be useful to try a different FTP client, or perhaps use a
"debug" mode that'll show the PORT command that's being sent. Then you could
check your firewall settings to see if its being blocked or not...
> I suppose this is somewhat of a newbie question, but it sure beats me.
> I am trying to download some files from the dutch freebsd
> I fire up ncftp and go to ftp.nl.freebsd.org.
> I log on as "ftp" with my email address as passwd, then go to the
> 3.2-RELEASE directory.
> I do "ls" to see what's there. Works fine. Then I try "get" to get the
> file I want and I am told that was an "Illegal port command"
> I try another "ls" to see if maybe I mis-typed the filename (that
> wouldn't give an "illegal port command" but hey, I didn't know what was
> going on). Again, I get an "illegal port command". What the ... ?
> So I logout, then reconnect to the ftp server. I do an ls in the /
> directory. Works fine. I do another ls. It says again "Illegal port
> command". I experiment some more: whatever command I igve which returns
> output to me i.e, "ls", "get", "mget" etc. works fine *once*, then the
> second time it gives me an "illegal port command".
> It doesn't matter which of those commands I use. I can also still type
> "cd" and "pwd" every time, but no longer "ls", "get" or "mget" after
> having used either of them *once*.
> I have the same problem when I use the vanilla "ftp" program, and when I
> try a master site like ftp.cdrom.com
> I'm running release 3.1 on a pentium 200, and work from a LAN connected
> to the internet via a dial-up line.
> What is going on here? Can anyone tell me *why* I get "illegal port
> command" messages for commands which are obviously very *legal* ?
> This is driving me pretty crazy... Thanks for any help you can give...
> Martijn Herber