Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

502 Illegal PORT Command

Status
Not open for further replies.

spinto

Technical User
Dec 30, 2001
4
US
Hi,

I am running RH 7.2 and have setup Wu-Ftpd to except anonymous ftp connections from a separate dir.

I have 2 win9x boxes and the linux box behind a Linksys BDFSR41 Router.

I have forwarded ports 2121 from the linux box.

I have edited the /etc/services file so FTP is listening on port 2121.

I have edited the /etc/ftpaccess file allowing anonymous access.

Now if I use my ftp client and access the linux box using 192.168.***.*** I have no problems.

But when I use my ftp client and access the linux box from the other side of the linksys I get the message,
"502 Illegal PORT Command"

If I type ftpwho on the linux box it shows me idle.

What am I missing here?

I am real new to Linux, but am begining to really like it.

Thanks in advance,

Andy,

P.S. please don't tell me I will need to reboot, I get a kick out of running top and seeing up 32 days, 13:35
 
FTP uses two ports -- one for the command info, and one for the actual data being sent. When you open a new connection the port number gets sent along. It appears that your Linksys isn't "eavesdropping" on that info, and thus doesn't know what port is being chosen. Try using Telnet to connect to the FTP port and issuing the appropiate FTP commands to open a connection (see RFC for FTP at to see what your FTP server assigns.

Chip H.
 
Chip,

Thanks for the help, this is what seemed to be happening;

I used telnet to make a connection from a win9x box, that is behind the linksys, using the ip address of the linksys with the forwarded ports. I was able to connect as user anon, but if I tried to ls the dir I got
"425 Can't build the data connection" atleast a different response than before. On the server side if I used the ftpwho command it again showed me idle. I used the PORT command but got nothing. I could still ftp using the 192.168.***.*** address, with no problems.

I then tried to ftp from a shell account on the other side of the linksys, and it worked!

So basically, it has been fine all along, however on the local network I can only ftp using the 192.168.***.*** address. Not sure why that is exactly, I have other ports forwarded for VNC, and Apache with no problems.

Thanks for the pointer.

Andy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top