iBualoy

ProFTPD and MasqueradeAddress from LAN Network

MasqueradeAddress

This might be a stupid mistake but it made me headache all night long. I made the FTPES testing on ProFTPD on Ubuntu 8.04, in order to access from the internet, then I have to configure MasqueradeAddress to the domain name that can resolve to my WAN IP address from outside. But If I set MasqueradeAddress, I will have the problem on FTP Layer in all CMS, Joomla, Wordpress. The CMS will show the error message that it cannot find the correct path of the editing file, etc. If included the wordpress auto updating problem, I had this problem few weeks already, but at that time I didn't know that this is the same problem.

What is MasqueradeAddress?

MasqueradeAddress is one directive in ProFTPD that use together with PassivePorts for TLS connection.

MasqueradeAddress causes the server to display the network information for the specified IP address or DNS hostname to the client, on the assumption that that IP address or DNS host is acting as a NAT gateway or port forwarder for the server.

# In some cases you have to specify passive ports range to by-pass
# firewall limitations. Ephemeral ports can be used for that, but
# feel free to use a more narrow range.
PassivePorts                  53100 53199

# If your host was NATted, this option is useful in order to
# allow passive tranfers to work. You have to use your public
# address and opening the passive ports used on your firewall as well.
MasqueradeAddress        namo.sppc.in.th

resource: http://www.proftpd.org/docs/directives/linked/config_ref_MasqueradeAddress.html

What was the problem?

If your server is a home server or behind NAT firewall router, the resolved IP Address from WAN and LAN from domain name may be not same. In my case If I enable MasqueradeAddress, my ftp client (filezilla) can connect to FTP server correctly without any problem, but there is a problem if I use ftp via application. I think in that case the server name is localhost, and it has some conflict about this MasqueradeAddress directive.

What is the resolution?

After I googled for a while, in this case I have to configure virtualhost in proftpd configuration, which call only specific domain name, and proftpd will activate MasqueradeAddress seperately for each virtualhost.

Bookmark Email this Feed Hits (4690)
Tigran
06 February 2012

...

You can also use IfClass directive from mod_ifsession to set MasqueradeAddress depending on the client IP if the VirtualHost configuration is not possible in your particular case.
Reply Report JC IP173.245.49.111
Martin
27 June 2010

An example of proftpd.conf

I am trying to get this to work.
Do you have en example of the config?

Best regards
Martin
Reply Report JC IP91.100.57.226
busy
You are here: Blog iTech Networking ProFTPD and MasqueradeAddress from LAN Network