Ftp with port forwarding

Discussion in 'Server Operation' started by treeman, Sep 8, 2009.

  1. treeman

    treeman New Member

    Hi guys,

    I am having more problems as usual, this time I am trying to port forward a ftp server to the outside world. I have forwarded port 21 to 600 externally and it nearly works perfect. I can connect from the outside, view files, download files no problem. Once i try uploading a file it gets stuck on 2 or 5 % depending on the size and eventually times out. If i upload very small files they will get through, I can't get my head around it. First I thought it need to forward port ranges for passive mode but its still the same, and it downloads no problem so if it was port ranges it wouldn't work both ways right? Anybody experience something similar? Thank you
  2. meeso

    meeso New Member

    I think you're going to have to forward more than just 21. That's just your basic connection (authentication/etc) If you are doing active you're going to need port 20 to be able to make it through and probably some upper range ports.

    What FTP server software are you using? What OS? etc..

    More info on how Active/Passive transfers work and example port ranges:

    Active FTP :
    command : client >1023 -> server 21
    data : client >1023 <- server 20

    Passive FTP :
    command : client >1023 -> server 21
    data : client >1023 -> server >1023

    I hope this helps!

    - Chris
  3. treeman

    treeman New Member

    Thanx for your reply I will try all the info you gave me,
    I am using Centos 5 with vsftpd

  4. treeman

    treeman New Member

    hmmm this is strange but now I used a xp machine and connected to the fpt through my computer, just ftp://address ... and it works, I was using ws_ftp client on xp and gftp on linux before to connect when getting the problem, must be some setting in the clients then in case anybody has similar issue
  5. webcoders

    webcoders New Member

    Same Issuie

    I am having the same problem I can connect and upload files but. It stops after about 5% then I cannot re connect. (using Filezilla client) I'm also unable to view the control panel on port 8080 after this happens it is like my ip address gets blocked. This has been driving me mad tiring to figure it out. I am running a Ubuntu server 9.04 w/Perfect server setup pureftp.
  6. treeman

    treeman New Member

    Hi, in my case the problem went away after router firmware upgrade. Since I have seen it a few times. The culprit in my case was a mtu difference between nic and router. Go to your router and see what your mtu is, then make sure it is the same on your server that you have ftp running on.
    E.g ifconfig eth0 mtu 1500

    Also please provide more details,
    Are you connecting from internal network or externally?
    Port forwards, firewall?

Share This Page