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 behind NAT fails (again)

I run an ftpserver on a winXP box on my internal network (port 8021).
Now I would like the ftp to be accessible from the Internet too.
I searched the posts and have tried alot getting it to work. People can login, but data transfer always fails.
Maybe someone can tell me how to get it to work. (exact settings for definitions and d/snat rules maybe?)
Greetz  


This thread was automatically locked due to age.
  • Which ftpd are you using ?

    Are you using PASV mode ?  Have you assigned passive ports to use ? 
  • is psd enabled? this may interrrupt ftp data connections. 
  • I have tried both active and passive configurations. I'm using Serv-U 4.1, it is configured for passive use, and I have tried changing passive ports and assigned ports accordingly.
    PSD is indeed on, I'll disable it and see if this eliminates the problem.  
  • It seems to be working now, however I cannot get it to work to forward e.g. 8021 on astaro external interface to 21 on a pc to the local network. I now run the internal ftp on port 8021 too. Anyone has an explanation for this?  
  • Correction, it only seems to work a little bit. People on my ISP are having no trouble at all. Others can list in active mode, others can't list in active nor passive. I really don't know what to do. Maybe it has something to do with my ISP blocking ports 1:1024 for connections to my external ip (ppl on the same isp aren't blocked though). When I change the controlport of the ftp to 8021, the dataport would be changing to 8020 my guess, or could it be that it is still port 20? I tried snatting too but didn't seem to work properly either...  
  • Have you examing the dropped packet log files during a connection attempt ?  They can tell you a lot.

    I have my FTP Serv-U down at the moment and rules all gone.  If you get really stuck I'll set it up again.  I an't quite remember how it was set up before but I had it working at one stage 100% 
  • Serv-U
    Setup for Port 8002 Passive range 35420->35429
    Serv-U must also know your external IP address

    Astaro

    Network:FTP_Server 172.16.1.10 255.255.255.255 (IP of ftp server)
    Service: FTP_Port  tcp 1024:65535  8002:8003 (whatever ports you use)
    Service: FTP_Passive tcp 1024:65535  35420:35429 (what ever passive range you set up on Serv-U)

    DNAT/SNAT
    Source:Any
    Destination: external interface eth?
    Service:FTP_Port
    Change Dest:FTP_Server

    DNAT/SNAT
    Source:Any
    Destination: external interface eth?
    Service: FTP_Passive
    Change Dest: FTP_Server

    Packet Filter
    From: Any
    To: FTP_Server
    Service: FTP_Port
    Allow

    From: Any
    To: FTP_Server
    Service: FTP_Passive
    Allow

    This setup seems to work for me...

    Dan

           
  • Now I can't get Serv-u working either [:(]

    I can connect and login but no directory listings.  From what I can tell I have passive mode correctly configured

    Serv-U: Running on internal IP 192.168.2.201
    Serv-U: Port 21
    Serv-U: Passive port range: 21010-21030
    Serv-U: Passive IP: 203.15.140.27 (ASL Red interface)

    Astaro config:
    Network: FTPServer 192.168.2.201 255.255.255.255 (IP of ftp server) 
    Service: FTP tcp 1024:65535 20:21 
    Service: FTP_Passive tcp 1024:65535 21010:21030 

    DNAT/SNAT 
    Source:Any 
    Destination: ADSL_Interface
    Service:FTP
    Change Dest:FTPServer 

    DNAT/SNAT 
    Source:Any 
    Destination: ADSL_Interface 
    Service: FTP_Passive 
    Change Dest: FTPServer 

    Packet Filter 
    From: Any 
    To: FTPServer 
    Service: FTP 
    Allow 

    From: Any 
    To: FTPServer 
    Service: FTPPassive 
    Allow 

    I'm sure I've had this running before but now I am trying to run the system on Windows 2003 Server.  Unsure if Win2003 is causing this or not...

     
  • I have pretty much the same setup (serv-u, ASL 4.0) and mine works properly. Here's the differences I have. 

    I'm using active ftp, no passive. So, the two DNAT/SNAT rules I have are redirecting the FTP and FTP Control services (included by default in the service group) forwarded to my internal ip. Same setup in packet filter. I don't see ftp control anywhere in your setup. Maybe add that in to your DNAT and Packet rules and see what happens.
  • Will give it a go, thanks.