× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




I have a PC based FTP server which is listening on port 21 and have set up
port redirection to accept requests on, say, port 400 and redirect those
through to port 21 on the iSeries.

I wouldn't expect this to work. I'd expect that when trying to do an upload, download, or directory listing, the connection would hang.

My client, however, is unable to connect to the iSeries although he can get
through from his box to the PC based server on port 21.

Are you sure he's unable to "connect"? Is it possible that the problem is occuring later when he tries to do a file transfer (directory listings are also file tranfers of a sort).

You see, the FTP protocol doesn't operate on a single port. It starts with port 21, but when you transfer a file it sends (over port 21) a note saying "connect to me at IP address x.x.x.x on port number pppp) and the other end of the session tries to open a connection to that port on that address.

However, when you use a NAT router, the actual IP addresses aren't the same. You might use 192.168.0.1 on the inside router, and a public IP address 1.2.3.4 on the outside of the router. Unfortunately, the FTP server doesn't know this, and tells the remote host to connect to port XXX on 192.168.0.1 -- which will fail.

NAT machines are smarter than that, though. They actually monitor the traffic on port 21 -- when they see the FTP software say "connect to 192.168.0.1" they change that message to tell it to connect to 1.2.3.4, and therefore it works correctly.

However, if you ran FTP on a nonstandard port (for example 400) it wouldn't know that it had to monitor that port for an IP address being sent, and therefore wouldn't fix the address. So I'd expect FTP on any other port besides 21 to fail. (Unless, of course, your router provides a way to designate port 400 as an FTP port.)

Back in the olden days before routers were smart enough to monitor port 21 traffic and fix it, you could work around the problem by using passive mode (if the server side was behind NAT) or standard mode (if the client side was behind NAT). You could use this to make port 400 work for you -- but it'd only work if they're not BOTH behind a NAT router. If both ends are behind NAT, the router needs to monitor and fix the data, otherwise it'll fail.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.