Guest User!

You are not Sophos Staff.

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

Problem with passive FTP

I'm having trouble with passive FTP through my ASG v7.007 box.  It's running bridged mode, so no masquerading or DNAT/SNAT to complicate things.  The initial connection goes fine, but when the client issues a PASV command, it all turns sour.  The client receives no further communication from the server, and eventually the connection times out.  At the same time, the Packet Filter log shows (several instances of) the following:

21:40:13  TCP  192.168.0.4:21 → 192.168.0.3:2107 [ACKPSH ] len=88 ttl=128 tos=0x00


192.168.0.4 is the FTP server; .3 is my client.  These lines are grey; what does that signify?

If I turn off passive mode, then it all works perfectly, and the above line is replaced by the following green one:
21:51:32  Packetfilter rule #10  TCP 192.168.0.3:3098 → 192.168.0.4:21 [ACKPSH ] len=46 ttl=128 tos=0x00 srcmac=00:09:5b:xx:yy:zz dstmac=00:90:27:xx:yy:zz


I've tried adding a rule to allow traffic from 192.168.0.4:20or21 to any, but to no effect.

Surely there must be a way to allow passive FTP through ASG?  I can use active mode internally, but some remote clients have to use passive due to their own firewalls.


This thread was automatically locked due to age.
  • I don't know if it'll help in Bridged Mode, but try this:
    Go to Network Security / Packet Filter / Advanced and turn on the FTP Connection Tracking Helper (and don't forget to hit Apply).

    Barry
  • Are you running a FTP server or a client?

    If you're running a server, you probably want a PF rule like:
    from any, to FTP server, ports TCP 20:21, allow.

    If you're running the client, keep in mind that a PASV FTP connection will use random ports, which is what the connection tracker is supposed to help with.
    Take a look at the packetfilter log if it still doesn't work.

    Barry
  • Go to Network Security / Packet Filter / Advanced and turn on the FTP Connection Tracking Helper (and don't forget to hit Apply).
    Thanks, it was already enabled.

    Are you running a FTP server or a client?
    Both.  I'm trying to connect to my FTP server from my FTP client through the ASG.

    If you're running a server, you probably want a PF rule like:
    from any, to FTP server, ports TCP 20:21, allow.
    Yep, done.

    If you're running the client, keep in mind that a PASV FTP connection will use random ports, which is what the connection tracker is supposed to help with.
    Take a look at the packetfilter log if it still doesn't work.
    Thanks for the connection tracker tip; pity it was already enabled - I thought that was a solid lead.  The packet log merely shows the grey line I mentioned above.

    Interestingly, I turned on "Log FTP data connections", and without PASV, I see a very similar grey SYN packet in the log, from port 20, identified as an FTP data connection.  It's the ACKPSH packet from port 21 when trying to establish PASV mode that appears to be the problem.  Perhaps this is a bug in the connection tracker?
  • Do you have a non-bridged INT interface on your firewall you can try?

    I just tried passive FTP from outside to my linux server in my DMZ, and it's working fine, although it does take quite a while to connect for some reason.
    I'm not using bridging on the EXT or DMZ interfaces though. (I do have an internal bridge however.)

    Barry
  • Grey packets are good.

    Ian M
  • Do you have a non-bridged INT interface on your firewall you can try?
    Good suggestion.  Tried that, but no joy; same symptoms.

    I just tried passive FTP from outside to my linux server in my DMZ, and it's working fine, although it does take quite a while to connect for some reason.
    Everything points to the fact that it should work.  I wonder if I've managed to screw something up in some esoteric buried setting somewhere.  Guess I might try configuring from scratch again after the long weekend.

    Grey packets are good.
    Even grey packets that don't have any description such as "FTP data connection"?  In active mode they're identified as such, but in passive mode the description is blank.
  • Maybe there's a firewall on the other end of the connection that is aggravating the problem?

    We had trouble with ASL6 FTP'ing files to Google's FTP server... they eventually updated their firewall.

    Barry
  • Just throwing this out there. I was using FTP provisioning on Polycom phones, and could get provisioning to work until I disabled Connection Tracking Helpers for FTP...

    Firmware version:   9.409-9
Share Feedback
×

Submitted a Tech Support Case lately from the Support Portal?