I have an FTP server configured on a Debian machine: one user need to access another FTP server that is behind that machine and we have only one public IP address.

The solution that comes to my mind is to set the home dir for the user to one directory where I mount a remote FTP server using ftpfs.

Any other solutions?


How about having the special user connect to the gateway on a different port, and redirect that port to the ftp server on the machine behind it ?

  • normal case:

    user$ ftp gateway

    -> connects to the gateway on port 21 as usual

  • special case:

    user$ ftp gateway 2121

    -> connects to the gateway on special port 2121.
    gateway redirects it to port 21 on the machine behind it so user reaches the other ftp server.

Only trick is to set port redirection. Depends if you're behind a router or if the linux box is the gateway.

  • ftp doesn't require also a data port (20) ? how can I redirect also that port? – Mauro Destro Jan 10 '13 at 7:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.