Cannot enter pasv / retrieve file listing from server

Hello,

I have searched everywhere for an answer to this problem, and have been trying to find a solution for a few weeks now and nothing that ive come across solves the problem that I am having.

A friend of mine is running an FTP server (Cerberus) and is hosting files for a small handful of people for various coding projects related to a game that we all play. Each person has their own account associated to its own directory independent of the other accounts. I am using the latest version of SmartFTP as my FTP client, and I have shut off every firewall and AV program that may be interfering with the client as well as the windows firewall. However when I try to connect to the server, the client appears to attempt to enter passive mode and always fails and will not give me a remote directory listing, my friend confirms this saying that its showing up in the logs that the server and client were not able to establish a passive connection.

Apparently I am the only person having this problem as the 3 or 4 other people are having no problems at all getting on and updating their files etc. When I try using one of the other peoples account that we know is working I have the same problem as if I was trying to connect using my own account. I am however able to connect to other FTP sites without any problems at all.

The last thing that I would be able to think that may be the problem would be my router, I have a lynksys wireless router that I flashed with a 3rd party firmware called DD-WRT, the DD-WRT site has a help and FAQ section but I am not able to find anything related to my problem at all so I question whether or not it is the problem.


Here is the logs of me trying to log in:
[20:27:28] SmartFTP v2.5.1008.6

[20:27:28] Resolving host name "<edit>.150.40"

[20:27:28] Connecting to <edit>.150.40 Port: 6999

[20:27:28] Connected to <edit>.150.40.

[20:27:28] 220 Welcome to The World Class Slackers FTP

[20:27:28] USER <edit>

[20:27:28] 331 User <edit>, password please

[20:27:28] PASS (hidden)

[20:27:28] 230 Password Ok, User logged in

[20:27:28] SYST

[20:27:28] 215 UNIX Type: L8

[20:27:28] Detected Server Type: UNIX

[20:27:28] FEAT

[20:27:28] 211- Additional features supported include:

[20:27:28]  MDTM

[20:27:28]  SIZE

[20:27:28]  REST STREAM

[20:27:28]  AUTH TLS

[20:27:28]  AUTH SSL

[20:27:28]  PBSZ

[20:27:29]  PROT

[20:27:29]  LANG EN*

[20:27:29]  SITE CHMOD

[20:27:29]  SITE PSWD

[20:27:29] 211 End

[20:27:29] Detected Server Software: Serv-U 4.x

[20:27:29] PWD

[20:27:29] 257 "/" is the current directory

[20:27:29] TYPE A

[20:27:29] 200 Type ASCII

[20:27:29] PASV

[20:27:29] 227 Entering Passive Mode (<edit>,150,40,0,0)

[20:27:29] Opening data connection to <edit>.150.40 Port: 0

[20:27:29] LIST -aLT

[20:27:29] The requested address is not valid in its context.

Additional Potentially useful information:
-I am running windows XP SP2 and have tried on Vista
-The server is setup to listen to 6999 instead of 21 as a security measure
-I Have tried forwarding ports and not forwarding ports
-I have tried multiple FTP clients
-I have tried entering active mode, the Client fails.

I would greatly appreciate it if anyone could help me out with this problem, if you need any more information or elaboration please let me know

Thanks in advance to those that reply.

For some reason the server returns port number 0 in the PASV reply. The problem might also be your NAT router which rewrites the IP address/port if it detects a FTP connection.
Workaround:
Try active mode (PORT) instead of passive mode (PASV).

I tried that before and it didnt work, Tried it again and here are the logs.
[08:28:39] PWD

[08:28:39] 257 "/" is the current directory

[08:28:39] TYPE A

[08:28:39] 200 Type ASCII

[08:28:39] PORT 192,168,1,137,4,83

[08:28:40] 500 Port command invalid

[08:28:40] Automatic failover of data connection mode from "Active Mode (PORT)" to "Passive Mode (PASV)".

[08:28:40] PASV

[08:28:40] 227 Entering Passive Mode (68,190,150,40,0,0)

[08:28:40] Opening data connection to 68.190.150.40 Port: 0

[08:28:40] LIST -aLT

[08:28:40] The requested address is not valid in its context.

Does seem like it is a NAT problem, but why on earth would it only exist between my friends server and myself. Is there any special settings that should be enabled within the router itself? I never thought port forwarding would be necessary for an FTP program..especially given that the problem is only happening between my friend and I.