This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

FTP out questions

Is it possible to set up a single rule that will allow any ftp connections out, but that the ftp connections to the server are on different high ports?  for example, 1 rule that would allow connections from behind the filewall to servers on ports 3333, 4444, 9999, and 30000? 


This thread was automatically locked due to age.
  • [ QUOTE ]
    Is it possible to set up a single rule that will allow any ftp connections out, but that the ftp connections to the server are on different high ports?  for example, 1 rule that would allow connections from behind the filewall to servers on ports 3333, 4444, 9999, and 30000?  

    [/ QUOTE ]
    Sure, easy enough...

    Define your new services, FTP3333, FTP4444, etc.
    Then add the newly defined services to a Service Group FTPOUT.

    Now create a packet filter rule "Internal_Network__   FTPOUT   Any   Allow"  
  • It isn't that easy! The responsible connection tracking module for FTP is 'listening' for connections on port tcp/21 only. You could add the additional ports manually to /usr/local/fw/firewall_on.sh, but I am not sure about the sysntax and the module to add the additional ports. It is either ip_conntrack_ftp or ip_nat_ftp (sorry no time to  test it at the moment) but maybe others can help here.

    Greetings
    cyclops  
  • I use the SNAT definition below to make a webmail server on port 80 on the Internal network available on port 88 on the External network:

    WebMail  Any -> External_Interface__ / HTTP-88 None webmail.fakedomain.com / HTTP

    You could do something similar for your FTP server, you just have to keep in mind that you need to create a 2 port service definition for the high order ports you are going to use.

      
  • The big question is does your FTP Server support Passive mode? If it does, set a range of passive ports  in your FTP Server and forward all of them from Astaro to your server. I have ServU set up this way. If your server can only do active FTP, well, you will have to look into ip_conntrack_ftp or ip_nat_ftp. 

    Dan