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 over VPN

I've got a VPN between our v6.3 and v7.306 firewalls.
Let's call them location 6 and 7.

I have a rule on both ends allowing FTP traffic from a server in 6 to a server in 7.

However, PF log in 7 shows dropped packets on port 20 going back to 6.

The NAT FTP helper is enabled, but since the VPNs aren't NAT'd, that's probably irrelevant.

I've changed the FTP service def on both ends to have the DEST ports 20:21.

I've temporarily added a rule to allow 7 to make port 20 connections to 6, and the packetfilter drops have cleared up, although the FTP connections still aren't working fully.

What is the proper procedure here?

Passive mode doesn't seem to be working either. Admins say that the FTP server needs ports 21000-21100 for PASV, but none of those are showing as dropped, and tcpdump on the ftp server doesn't show those ports either. 

Thanks,
Barry


This thread was automatically locked due to age.
  • Barry, over on the German Forum, I explained how I thought this worked when offering an FTP server to the outside world, and was corrected by Mario Schmidt (trollvottel).  Here's a link to my corrected post that contains:
    I don't know what you have in the "Active FTP" service, but the standard definition for "FTP" is '1:65535 -> 21'.

    I think it's clearer when you don't use the automatic PF rules in DNAT. To allow Active FTP traffic, you need two packet filter rules:

    'Any' -> [Port 21] -> [FTP Server] : 'Allow'

    [FTP Server] -> [Port 20] -> 'Any' : 'Allow' 


    If you are using Passive FTP on your FTP Server, then you need to add another PF rule for those "inbound" ports; this rule will look like Rule 1 above. And, as Mario points out below, you would need a second DNAT for that traffic.


    The DNAT is 'Any -> FTP -> [External IP] change to [FTP Server]'.

    In your situation, it sounds like you only need a service definition for "Passive FTP" of '1:65535 -> 21000:21100' and two packet filter rules allowing the client access to the FTP server. It sounds like you don't need the two DNATs that would have been necessary to offer the FTP outside.

    Cheers - Bob
    PS Mario commented:
    In case you need an english description, I recommend http://www.ncftp.com/ncftpd/doc/misc...ASVNATProblems
  • OK, thanks.
    I did setup the outgoing port 20 rule, it just feels strange to have to do that.
    I haven't had to do that on ASL6 though, even if not doing NAT.

    I had seen the German post a few days ago but didn't see that there were answers in English.

    Is this right though?
    "the standard definition for "FTP" is '1:65535 -> 20'."
    shouldnt' it be 21?

    Thanks,
    Barry
  • You are correct.  I have corrected my post.

    Thanks! - Bob