Koozali.org: home of the SME Server

Passive FTP with Dynamic IP

Offline DungaBee

  • **
  • 26
  • +0/-0
Passive FTP with Dynamic IP
« on: January 18, 2006, 06:57:19 PM »
Has anyone been able to configure proftpd to work with passive mode and a dynamic IP?

When I ran Slackware before I had a simple script that got my current IP and then updated the conf file for the FTP daemon and then would bounce the FTP daemon if there was a change.

It looks like ProFTPd can do the same thing, but perhaps a bit cleaner, but I am not sure how it will work with the template system of SME.

Here is what I found so far:

It looks like I could use the MasqueradeAddress directive to have the server look up my IP upon startup.  I little info about this directive is here:

http://www.castaglia.org/proftpd/doc/contrib/ProFTPD-mini-HOWTO-NAT.html

I also found this module that can be used to update the IP address that the DNS name points to.  The module name is mod_dynmasq.  Here is some info about it:

http://www.castaglia.org/proftpd/modules/mod_dynmasq.html

From looking over the template system a very little bit, it looks like all of the directives for proftpd are stored in individual files, so I am not at all sure that the mod_dynmasq module would work in this case.

I am hoping that someone has either tackled this issue already, although I could find nothing in the forums, or could maybe look in to my possible solution to see if it is feasible or not.

This may even be a question for the developers, I'm not sure.

Thanks for any help you can provide.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Passive FTP with Dynamic IP
« Reply #1 on: January 18, 2006, 10:14:26 PM »
Quote from: "DungaBee"
Has anyone been able to configure proftpd to work with passive mode and a dynamic IP?


proftpd works in passive mode out of the box without any special configuration. If it doesn't for you, then file a detailed bug report indicating exactly what you are trying to do, and exactly the  way in which it fails, via the bug tracker. Link is to the left.

Offline DungaBee

  • **
  • 26
  • +0/-0
Passive FTP with Dynamic IP
« Reply #2 on: January 19, 2006, 02:10:34 AM »
I should also mention that I am running in server only mode with a separate firewall.

I think that may be why it does not work since SME is not also doing the firewalling too.

Let me know if that changes anything and I'll gladly fill out a bug report, if needed.

Thanks for the reply too.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Passive FTP with Dynamic IP
« Reply #3 on: January 19, 2006, 03:16:39 AM »
Quote from: "DungaBee"
I should also mention that I am running in server only mode with a separate firewall.


Your firewall is the problem. There's nothing you can do at the SME end to make  it work.

Offline DungaBee

  • **
  • 26
  • +0/-0
Passive FTP with Dynamic IP
« Reply #4 on: January 19, 2006, 01:43:27 PM »
I am not sure that is the case.  I have the PassivePorts directive in the proftpd config and then the same ports forwarded through my firewall.  The second component to that is the MasqueradeAddress in the proftpd config.  I have that in there as well as my current IP and passive FTP works perfectly.

My only issue will be when my IP changes.  I am thinking maybe a script that would detect the IP change and rewrite the 'MasqueradeAddress' template file and then invoke the template rebuild might do the trick.