strange ftp question

jhu

Lifer
Oct 10, 1999
11,918
9
81
here's my setup:

1)router running linux w/ adsl connection
2)my computer (and roommate's computer) connected to router
3)ssh and ftp ports forwarded from router to my computer
4)ssh and ftp access only granted from the school's computers
5)i can remotely ssh to my computer just fine


problem: i can remotely ftp to my computer, but if i try to list any files on my computer the ftp program doesn't seem to know what to do (ftp program just stops). it seems like there's something wrong on the server side (my computer) but i don't really see where it is. ftpd is started from inetd whereas sshd is started separately. could that be the problem? also i can ftp files to and from my computer from his computer just fine. any ideas?
 

jhu

Lifer
Oct 10, 1999
11,918
9
81
i tried sftp. i get the same thing: i can log in but the program still stalls when i try to list the files on the server.
 

Damaged

Diamond Member
Oct 11, 1999
3,020
0
0
Did you try setting your client to passive mode?

Also, did your forward port 20 (ftp-data) as well as port 21?
 

jhu

Lifer
Oct 10, 1999
11,918
9
81
ok, i enable port 20 forwarded also. but what do you mean by setting the client to passive mode?
 

jhu

Lifer
Oct 10, 1999
11,918
9
81
the ftp client on the school computers don't have the passive mode option. but that shouldn't be a problem because the router allows connections from the school computers only.
 

Damaged

Diamond Member
Oct 11, 1999
3,020
0
0
Hmmmm, most ftp clients will have the option to use passive mode for just this issue: an ftp server behind a firewall. It's particularly annoying when going from one firewalled system (like is probably the case at your college) to another, like your system.
 

jhu

Lifer
Oct 10, 1999
11,918
9
81
you wouldn't happen to have the source to the ftp client would you? i tried looking on the gnu site and didn't find anything.

also, i can ftp to the school computers from my computer without any problems.
 

jhu

Lifer
Oct 10, 1999
11,918
9
81
i'm using the ftpd that came with mandrake on my computer(in.ftpd)

i'm using the solaris supplied ftp client at school.
 

Damaged

Diamond Member
Oct 11, 1999
3,020
0
0
Hmm, okay. I'm not sure which ftp server is standard for Mandrake, but my guess would be wu-ftpd.

As for the standard cli ftp client for Solaris there's no way to set that one to passive transfers. See if you have ncftp on the system though. It's quite a popular client, and it's much nicer as it does both command and filename completion. That one you can set to passive mode.
 

jhu

Lifer
Oct 10, 1999
11,918
9
81
well, the program's called in.ftpd in the /usr/sbin/ directory but when i log in it says it's wu-ftp.
 

Damaged

Diamond Member
Oct 11, 1999
3,020
0
0
All that the in.ftpd means is that it's using tcpwrappers, it's still wu.

You could try using Profptd instead, but I doubt it would make a difference. What you need to do is find an ftp client that will do passive mode.
 

jhu

Lifer
Oct 10, 1999
11,918
9
81
well, i downloaded and compiled the ncftp source and it does the same thing. i can't get it to work so i'm just going to use apache for the data transfers. thanks for the help.
 

Damaged

Diamond Member
Oct 11, 1999
3,020
0
0
And you set ncftp to passive mode? With ncftp open you can do set for the parameters that you can set, and you'll see passive in there, then it's just set passive on or something like that. Depends on the version.
 

Damaged

Diamond Member
Oct 11, 1999
3,020
0
0
Strange. Someone else had this problem as well. Why I'm not sure. However, as I recall he solved it by using ipmasqadm autofw instead of ipmasqadm portfw.
 

jhu

Lifer
Oct 10, 1999
11,918
9
81
well, it's no big deal. i'm just going to use httpd for all file transfers. thanks. i'll get back to the ftp thing later when i have more time
 

jhu

Lifer
Oct 10, 1999
11,918
9
81
turns out i didn't even need to ftp to my compuer. i could've just ssh and ftp from my computer to the school's computer. oh well, at least i found out there's a problem ftping to my computer.