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 nat Doesn't work

I have a BIG problem with my asg 7.504..
I have been trying to get it to "port forward" ftp connection (ftpes) to my internal server..
But, after 3 days trying to fix it I have given up so I turn to you guys here in hope for some help..
My packetfilter rules are:

Source: Any
Service: FTP
Destination: FTP (With network definition pointing to my ftp server, and a static dns route).
Action: Allow

Source: Any
Service: FTP-PASV (On these ports (1:65535 → 15000:15300))
Destination: FTP
Action: Allow

And my Dnat:

Traffic Source: Any
Traffic Service: FTP
Traffic Destination: External (WAN)(Address)
NAT mode: DNAT
Destination: FTP
Destination Service:

Traffic Source: Any
Traffic Service: FTP-PASV
Traffic Destination: External (WAN)(Address)
NAT mode: DNAT
Destination: FTP
Destination Service:

When I check packet filter logs all I se is:

Default DROP  TCP  192.168.1.20:4605→95.109.16.27:21

[SYN] len=48 ttl=128 tos=0x00 srcmac=00:18:f3:81:b8:ba  dstmac=00:13:46:3c:a0:92

Why does it give me a default drop on this ??
Suspect that I have some nice little error somewhere..
all help with this is appreciated.
//Siddus


This thread was automatically locked due to age.
  • I think you found your own answer. [;)]  Do you have a packet filter rule as follows?

    Source: FTP
    Service: FTP
    Destination: Internet (or Any)
    Action: Allow

    Cheers - Bob
  • You probably also don't need these:


    Source: Any
    Service: FTP
    Destination: FTP (With network definition pointing to my ftp server, and a static dns route).
    Action: Allow

    Source: Any
    Service: FTP
    Destination: FTP (With network definition pointing to my ftp server, and a static dns route).
    Action: Allow

    And my Dnat:

    Traffic Source: Any
    Traffic Service: FTP-PASV
    Traffic Destination: External (WAN)(Address)
    NAT mode: DNAT
    Destination: FTP
    Destination Service:


    The ASG should track the FTP session after the initializing packet and allow it entire, so the control connection allow should be enough. The DNAT rule should also bypass the packet filter, so no additional firewall rule for that should be required.
  • I have a packet filter rule that allows all traffic from my internal net to my external net..
    I am the only user.
    Or, should I specify access for every host ??
    I have been trying to get this working for some time now, I have even tried to use full nat with automatic packet filter rule, but nothing I do seems to work..
    //Siddus

    PS
    It seems that, when checking, many of my "special" rules (Direct Connect on port 60001 for example) gets drop'ed by default..

    I have to read the manual a little better and see if there are any answers in there [:)]
  • As far as I understand he is doing a DNAT and trying to reach that natted IP address from inside the same internal network as the FTP server is on. Did I asssume that correctly?
    In that case you cannot reach your FTP using the external IP you have to use the internal. The routing won't allow this. Have you tried from an external machine?

    Also: Make sure when using packetfilter rules that you use the INTERNAL address of your FTP server as the destination address. The astaro first does the DNAT, then goes to the PF. So it only sees the request to the internal address.
  • I can reach the ftp server from the inside without any problems but, when I try to reach it trough my external interface it gets blocked, same goes for my dc connection and also when I try to reach my internal mail server, that to gets blocked ..

    //Siddus
  • Sorry if I'm being picky here:

    Are you saying you are connection from an OUTSIDE location, meaning a different internet connection or just trying to reach the outside address of the interface but still using an internal machine?
  • From my internal machine I can reach the ftp server, with its external ip/name, which I suppose is astaro that reroutes me to the correct address..
    But, from the outside there is no connection, everything gets droped ..
    //Siddus

    PS
    I have been sitting to day and trying different settings and now it seems that I, finally, get pass the firewall in astaro but then astaro seems to not know where to send my requests ??
    from PF log (DirectConnet port:6001):
    Connection using NAT TCP 85.226.87.121:33172 ? 95.z.x.x:60001 [SYN] len=52 ttl=118 tos=0x00 srcmac=00:23:33:c1:fc:ff dstmac=00:13[:D]3:24:5a:4f

    Packet filter rule #19 TCP 85.226.87.121:33172 ? 192.168.1.20:60001 [SYN] len=52 ttl=117 tos=0x00 srcmac=00:23:33:c1:fc:ff dstmac=00:13[:D]3:24:5a:4f

    And on my internal machine there is no traffic back on this port ??
    Wich means that when I search on DC I don't get any response..

    The same seems to be correct for my ftp server also !!
  • This could happen if your internal devices don't have the Astaro as their default gateway.

    Cheers - Bob
  • I'm having the same problem.  We had a sonicwall and ftp worked fine. 

    I got RDP to work (it's on a different machine 192.168.4.146) so I know I'm doing something right.

    When I try to access ftp, it will ask for UID/PWD but it never hits the ftp server (192.168.4.200/freenas, gateway is 192.168.4.1 which is the Astaro)

    Astaro ftp proxy log shows:

    2010:05:20-15:18:18 astaro frox[3370]: ... to 71.98.***.***() 
    2010:05:20-15:18:18 astaro frox[3370]: Denied by ACLs. 
    2010:05:20-15:18:18 astaro frox[3370]: Closing session

    Siddus, did you ever get your to work?

    Thanks

    7.504