Friday, January 09, 2009

LinkSys Routers, PASV FTP, and Directory Listing Problems

My router started acted fruity adn I had to replace it. I had an old LinkSys router in the closet, so I pulled it out and hooked it up (I'd replaced it because it had a tendency to drop wireless). All the settings were still there from last time I used it, so everything it came up great. Only problem was when I FTP'd to my server from outside the network, I couldn't get a file listing.

I use a fairly old (and free) version of EasyFTP (which has served me well, hence I've never upgraded), and I hadn't changed anything settings. I could connect, just not get a listing. Passive or active, didn't matter. Much research, various port openings, closing and forwardings later, I still hadn't gotten it to work. But then I read something about how LinkSys returned the IP address of the FTP server when is PASV mode.

I looked in EastFTP's setting under teh settnis for PASV and it was:

Port Range: 1024 - 65535

Under the previous Buffalo router these settings had worked fine. But what I learned was that the LinkSys router was returning the IP as the IP of the server to the EXTERNAL ftp client. So the client was connecting, and then being told to go to to get the file list.

What I tried was changing the IP to match my external WAN IP. Once I did that, my client connected and... returned the file list!


So if you are running a LinkSys router with an FTP server and you aren't getting your directory/file listing, try setting the PASV IP on your FTP server to match that of you external WAN IP!