LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-06-2003, 09:32 PM   #1
lostboy
Member
 
Registered: Mar 2003
Location: Florida
Distribution: Slackware 9.1,10.1
Posts: 268

Rep: Reputation: 30
Unhappy I need help from the FTP guys


I'm out of ideas here.
I have set up wu-ftp, and it's working fine. If i SSH into the server, and :

Code:
xxx@hal:/$ ftp
ftp> open hal 31 (I have it set to port 31)
Connected to hal.home.org.
220 hal.home.org FTP server (Version wu-2.6.1(1) Sun Jul 6 19:54:49 EDT 2003) ready.
Name (hal:xxx): xxx
331 Password required for xxx.
Password:
230 User xxx logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> dir
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
total 96
-rwxrwxrwx    1 root     root           15 Jul  5 21:54 .bash_history
drwxrwxrwx    3 root     root        16384 Jul  5 09:10 xxx
drwxrwxrwx   27 root     root        16384 Jul  2 11:13 Linux
drwxrwxrwx    9 root     root        16384 Jul  3 11:31 NetworkShare
drwxrwxrwx    2 root     root        16384 Jul  3 21:53 development
drwxrwxrwx    2 root     root        16384 Jul  3 21:53 intranet
226 Transfer complete.
ftp>
as you can see, that works fine.

However, if I try to FTP in the usual way (not using SSH to get onto the host first), this happens :

(Keep in mind that halcp.no-ip.org is the http for the server)
Code:
root@xxx:/# ftp
ftp> open halcp.no-ip.org 31
Connected to halcp.no-ip.org.
220 hal.home.org FTP server (Version wu-2.6.1(1) Sun Jul 6 19:54:49 EDT 2003) ready.
Name (halcp.no-ip.org:root): xxx
331 Password required for xxx.
Password:
230 User xxx logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> dir
500 Illegal PORT Command
ftp: bind: Address already in use
ftp>
No dice. The server is behind a router (DI-604), and so is my client box here at home.I suspect something is going on with the routers, but of course I'm not sure.
I have set the FTP data port to 30. In the server router's config, I have ports 30-300 allowed in the firewall settings (I did that for passive file transfers which gFTP can use).
I have also set up a "virtual server" which is working fine, as I can login to the FTP server just fine. The router has port 31 open for the server.
As you can see above, things go wrong when I try to list the directory I'm in, because it trys to access the data port at that point.

Here's what gFTP tells me when I try it :

Code:
220 hal.home.org FTP server (Version wu-2.6.1(1) Sun Jul 6 19:54:49 EDT 2003) ready.
USER xxx 
331 Password required for xxx.
PASS xxxx
230 User xxx logged in.
TYPE I 
200 Type set to I.
PWD 
257 "/Z" is current directory.
PASV 
227 Entering Passive Mode (192,168,0,108,181,86)
Cannot create a data connection: No route to host
Disconnecting from site halcp.no-ip.org
BTW: it doesn't matter if I disable Passive Mode Transfer in gFTP. I get this error :

Code:
PORT 192,168,0,100,150,231 
500 Illegal PORT Command
Any ideas ? I'm at a loss.

JC

Last edited by lostboy; 07-07-2003 at 10:27 AM.
 
Old 07-07-2003, 10:17 AM   #2
lostboy
Member
 
Registered: Mar 2003
Location: Florida
Distribution: Slackware 9.1,10.1
Posts: 268

Original Poster
Rep: Reputation: 30
Question

Has anyone with a D-Link DI-604 router managed to set up an FTP server ?

JC
 
Old 07-07-2003, 04:29 PM   #3
lostboy
Member
 
Registered: Mar 2003
Location: Florida
Distribution: Slackware 9.1,10.1
Posts: 268

Original Poster
Rep: Reputation: 30
I don't think it's a router issue. I believe it has to do with permissions for a remote computer. The reason I say that is because in a console, I can FTP in and change directories, I just can't list their contents.

Anybody here good with wu-ftp ?

JC

BTW: it's not directory permissions that are getting me here. All directories that I want available via FTP are chmod 777.

Last edited by lostboy; 07-07-2003 at 04:32 PM.
 
Old 07-07-2003, 05:00 PM   #4
lostboy
Member
 
Registered: Mar 2003
Location: Florida
Distribution: Slackware 9.1,10.1
Posts: 268

Original Poster
Rep: Reputation: 30
I can also create directories. I just can't list them !?

I'm talking to myself here. Anyone want to throw me a bone ?

JC
 
Old 07-08-2003, 08:37 AM   #5
lostboy
Member
 
Registered: Mar 2003
Location: Florida
Distribution: Slackware 9.1,10.1
Posts: 268

Original Poster
Rep: Reputation: 30
Alright, if I can FTP just fine from computers inside the network to the server, but have the above stated problems when outside the network, and have the router configured properly, is it a safe bet to say that i'm being hosed by the router ?

JC
 
Old 07-08-2003, 08:37 AM   #6
slightcrazed
Member
 
Registered: May 2003
Location: Lisbon Falls, Maine
Distribution: RH 8.0, 9.0, FC2 - 4, Slack 9.0 - 10.2, Knoppix 3.4 - 4.0, LFS,
Posts: 789

Rep: Reputation: 30
I know by default that FTP uses one port for control (20), and one port for data (21) (I could have that backwards ). Anyway, as I understand it you're using different ports to do the connect. Do you have IPtables or IPChains running? Have you checked to see if the ports you're using are allowed. I remember from a while back that IPChains had a tough time with non-standard FTP ports, you had to re-write the chains to get it to work right. I don't think its a router issue (I actually have the same router, and have had no problems with local or remote FTP).

Thats the best I can do for ya...

slight
 
Old 07-08-2003, 10:47 AM   #7
lostboy
Member
 
Registered: Mar 2003
Location: Florida
Distribution: Slackware 9.1,10.1
Posts: 268

Original Poster
Rep: Reputation: 30
Talking

Thanks very much for the repply ! You may have a point there about non standard ports (in my case 30 & 31). Maybe I will have to investigate what is using port 21 instead of trying to skirt around the problem.

It's also good to know that you have the same router, and have set up an FTP server.

JC
 
Old 07-08-2003, 05:11 PM   #8
lostboy
Member
 
Registered: Mar 2003
Location: Florida
Distribution: Slackware 9.1,10.1
Posts: 268

Original Poster
Rep: Reputation: 30
Talking

Problem solved. And I feel a bit stupid.
Now I can't remember what was going on with proftp that I thought port 21 was being used by something else. But I assumed this to be the case, and didn't think much of it. No problem I thought, I'll just use port 31. So I installed wu-ftp and set it up for port 31.

Today :
First of all, I opened 'etc/services' and changed back to default port 21. I HUP'ed inetd. FTP'ed in, and guess what- no problems ! Everything works now ! Can you say user error ?

Not to mention, if I had just scrolled down a little in 'etc/services', I would have seen this :

msg-auth 31/tcp #MSG Authentication
msg-auth 31/udp #MSG Authentication

I think I've said enough. Silly me.

JC
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Thanks to all you guys! LizardMan Slackware 5 10-03-2005 09:04 AM
Hi guys! einnor LinuxQuestions.org Member Intro 5 01-28-2005 12:32 AM
OK guys need some help here MadcapMagician Linux - General 3 09-07-2004 04:09 PM
Sorry guys Dumpsterm0uth LinuxQuestions.org Member Intro 0 05-18-2003 06:24 AM
Need you help guys! eraser Programming 1 10-13-2000 11:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration