1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

FTP Error, Port forwarding Problem

Discussion in 'Cisco/Linksys Wireless Routers' started by t045ty, Nov 22, 2004.

  1. t045ty

    t045ty Network Guru Member

    hi,
    i'm from germany, sorry for my bad english
    I've set up a glftpd server on debian linux on port 5190!
    i made port forwarding on port 5190 but, everybody who wants to connect got an list or socket error!
    if i set the server on DMZ everything works fine!
    but dmz is very unsecure, so i want to make port forwarding but i doesn't work
     
  2. Esquire

    Esquire Mesquire Staff Member Member

    Are you running a firewall on your Linux?

    With your deamon is running, test to see if a port probe on port 5190 returns an OPEN status with port forwarding.
    https://grc.com/x/portprobe=5190

    Try to forward other higher ports as data ports as well - I set my deamon to use ports 60001-60010 and have users connect using PASV mode.
     
  3. t045ty

    t045ty Network Guru Member

    R] 227 Entering Passive Mode (192,168,1,3,129,3)
    [R] Opening data connection IP: 172.184.9.7 PORT: 33027
    [R] Data Socket Error: Connection refused
    [R] List Error
    [R] PASV
    [R] 227 Entering Passive Mode (192,168,1,3,129,4)
    [R] Opening data connection IP: 172.184.9.7 PORT: 33028
    [R] Data Socket Error: Connection refused

    no linux firewall!
    so if i set portforwarding for 33027 until 33035 ....
    then, the first connection success but the second connection failure and
    i need an higher port (33037 and 33039) .. .. . ..
    i hope you understand what i mean
     
  4. Esquire

    Esquire Mesquire Staff Member Member

    Sorry. I don't understand what you mean.

    Is your deamon still listening at port 5190 instead of port 21?

    Is the client being forced to connect at port 5190 instead of port 21? (e.g., ftp://ftpaddress.com:5190)
     
  5. t045ty

    t045ty Network Guru Member

    yes, i connect only on port 5130!
    but i need so set up the pasv ports, but i don't know where to set them up

    [R] 230- No dead connections found.
    [R] 230- _____
    [R] 230- ______________________________|__ |____ ________________________________
    [R] 230- \ _ / _ / _ / | | _ / _ / _ /
    [R] 230- \ \ / / / /____/. | | / / /____/. /_____/
    [R] 230- \________/____/ /______ |___|____|___/ /______ |____|
    [R] 230- .-=----------- /____/ ---- |____| --------- /____/ ---- |____| -------=-.
    [R] 230- `-=-------------------------------------------------------------------=-'
    [R] 230- `-----( Type 'site onel MESSAGE' to enter your message )-----'
    [R] 230 User t045ty logged in.
    [R] SYST
    [R] 215 UNIX Type: L8
    [R] FEAT
    [R] 211- Extensions supported
    [R] AUTH TLS
    [R] AUTH SSL
    [R] PBSZ
    [R] PROT
    [R] CPSV
    [R] MDTM
    [R] SIZE
    [R] SYST
    [R] RAIDEN_SUX
    [R] 211 END
    [R] CWD /
    [R] 250- --NEWS--
    [R] 250-
    [R] 250- New Feature: Login with (!)Username to kill ghost connections.
    [R] 250-
    [R] 250- --=- Type SITE HELP for a nice list of SITE commands -=--
    [R] 250-
    [R] 250 CWD command successful.
    [R] PWD
    [R] 257 "/" is current directory.
    [R] TYPE A
    [R] 200 Type set to A.
    [R] PROT P
    [R] 200 Protection set to Private
    [R] PASV
    [R] 227 Entering Passive Mode (192,168,1,3,129,3)
    [R] Opening data connection IP: 172.184.9.7 PORT: 33027
    [R] Data Socket Error: Connection refused
    [R] List Error
    [R] PASV
    [R] 227 Entering Passive Mode (192,168,1,3,129,4)
    [R] Opening data connection IP: 172.184.9.7 PORT: 33028
    [R] Data Socket Error: Connection refused
    [R] List Error
    [R] QUIT
    [R] 221- Goodbye
    [R] Logged off: t045ty
     
  6. Esquire

    Esquire Mesquire Staff Member Member

    I think it depends on the deamon. Unfortunately, I'm operating a Windows one.

    The FTP deamon I use allows me to set the ports for Passive Mode as well as the command port 21. I then configure Port Forwarding with port 21 and the PASV ports to the client running the deamon.

    Have you tested to see if those ports are opened? See the portprobe URL I posted in my first reply - just change the number at the end with the port number to probe the port you want.

    Another thing. How many simultaneous connections have you set in the deamon to allow per IP?
     
  7. t045ty

    t045ty Network Guru Member

    yes the port is open port 21 and 20 doesn't matter! i've set them open, but i have to configure the pasv ports somewhere, but i don't know where
     
  8. ImprezaDude

    ImprezaDude Network Guru Member

    The line: 227 Enterring Passive mode (192.168.1.3 etc).
    The numbers: 129,4 means what port number the client should connect to for data. This is how to figure it out:

    You multiply the first number with 256 and then add the second number;
    (129*256)+4=33028 This indicates for me, that the range propably starts at port 33000 to 33050 or something like that. You should be able to set this in your FTP servers configuraion.

    Regards
     

Share This Page