How to , and other stuff about linux, photo, php … A linux, photography blog. To remember some linux situation, and fix them quickly.

March 2, 2012

proftpd passive port not working

Filed under: Linux — Tags: , , , , — admin @ 12:20 pm

Well, we have to check a proftpd why was not working in some case.
Here are some error output:
227 Entering Passive Mode (10,108,211,224,191,201).
ftp: connect: Connection timed out

Status: Retrieving directory listing...
Command: PWD
Response: 257 "/" is the current directory
Command: TYPE I
Response: 200 Command okay.
Command: PASV
Response: 227 Entering Passive Mode (172,30,255,230,229,148)
Status: Server sent passive reply with unroutable address. Using server address instead.
Command: MLSD
Error: Connection timed out
Error: Failed to retrieve directory listing

Well from here look like passive mod not working ok.
I know that I open the port from firewall , for passive range. However this still was not working.
So it appear that when you are using passive mod, you have to use also and the masqueradeaddress section on proftpd.

So basically you should have something like this:
ServerName "your server name"
PassivePorts 49000 50000
MasqueradeAddress name.ofserver.com

Or you may use your routable ip on masqueradeaddress .
And not forget to open 49000:50000 range port in firewall.

Powered by WordPress