Routers and forwarding and FTP's, oh my

darktubbly

Senior member
Aug 19, 2002
595
0
0
I have this Belkin Cable/DSL router. After a recent call to tech support, they said I can't run port forward an FTP server running on anything other than port 21. Apparently you have to have a router that specifically supports this feature. Any truth to this? Or was the tech in a hurry to get home?
 

PrincessGuard

Golden Member
Feb 5, 2001
1,435
0
0
Running an FTP server behind a router can be tricky.

An FTP server actually requires 2 ports - 21 and a randomly generated one (for PASV) or 20 (for PORT). This randomly generated port is the problem since you can't tell the router to forward a port you don't know. One way to resolve it is for the firewall to have additional software that can read/rewite the FTP commands and automatically forward the requested port. Also, depending on your FTP server, you might be able to restrict the range of the random port to a manageable size.

Your particular router may only be able to do this on port 21, so the tech might not have been wrong.
 

rh71

No Lifer
Aug 28, 2001
52,844
1,049
126
I thought the 2nd port was always "-1" from what you set your FTP port to be... ?

I ran my FTP successfully using this concept BUT the users connecting to me needed to turn PASV mode off, IIRC.
 

PrincessGuard

Golden Member
Feb 5, 2001
1,435
0
0
The 2nd port is fixed on the server side in active mode. However, if the client is behind a router, active mode might not work for the same reason passive mode might not work if the server is behind a router.

Success really depends on how smart the routers are.