[CentOS] can't list directories in ftp

John R Pierce pierce at hogranch.com
Sat Aug 13 18:19:35 UTC 2011


On 08/13/11 11:07 AM, Barry Brimer wrote:
>> Response:	227 Entering Passive Mode (192,168,1,48,251,255).
>> >  Seriously thanks for your help here, it's greatly appreciated!
> You're welcome.
>
> Look above where I've left in the "Entering Passive Mode" line.  This is
> the address that is being used to send the connection back through.  As
> expected with localhost, it used 127.0.0.1, remotely, it used
> 192.168.1.48.  That is not going to work if you are being NATed somewhere
> using a different (public) IP address.  That is where the
> MasqueradeAddress comes into play.  Of course this only applies to
> *passive*  ftp connections.  Active FTP connections would be unaffected.
> By any chance when you tested and this worked in the past could you have
> been testing with active ftp?

FTP servers behind NAT are a pain in the butt, you have to support 
passive, as its the CLIENT that decides which mode to use.

if you load the ip connection tracker FTP module in your NAT (assuming 
its a linux system), then it will monitor the FTP port for these PORT 
commands and munge them on the fly to be correct, then your ftp server 
works inside or outside (you don't use the MasqueradeAddress in this mode)


-- 
john r pierce                            N 37, W 122
santa cruz ca                         mid-left coast




More information about the CentOS mailing list