Click to See Complete Forum and Search --> : ftp ->ls don't work
gurki
09-02-2002, 04:30 PM
I have set up a ftp server running SUSE Linux 7. The server is behind a ADSL router and I use port-to-ip translation.
I can logon via internet but the orders ls oder dir don't work. It prins following on the screen: "200 PORT command successful" and the cursor blinks on the next line.
If if I logon from inside (same side of router as the server is) it works.
can anybody help me?
cowanrl
09-02-2002, 04:47 PM
Try the dir command to list the directory contents instead of ls. I've found that some ftp servers respond to dir but not ls. Not sure why.
If ls fails, I always try dir.
gurki
09-03-2002, 05:25 AM
as I wrote, both ls and dir don't work. I thought there might be a problem with the rights on that directory but that seems ok.
bastard23
09-03-2002, 11:41 AM
gurki,
Unfortunately FTP uses two ports, 20 (data) and 21 (command). Are both of them being NATed? Your using the router as the NAT machine right? There are several other issues related to firewalls and NAT. Check this link:http://slacksite.com/other/ftp.html for a good description of the issues with active and passive ftp. I think the answer to your problem should be answered in Appendix 1, i.e. setting up passive FTP with high some ports opened up. Make sure nothing on your box is listening to those and you should be safe. And your users will have to use passive ftp.
good luck,
chris