Porf forwarding FTP/SFTP

I'm having a problem with port forwarding FTP connection. I would like to forward FTP connections to my local NAS and it is working but only with less secure configuration when I’m forwarding external port 21 to my NAS 21 port. When I’m changing external port to 8621 in order to not expose standard port my ftp client (Total Commader) is not able co connect (in active or passive mode). I’m getting:

Port failed, Try PASV mode
Server reports local IP messages.

My ideal configuration would be FTPS on some different port than standard but I can’t even set standard FTP on different port. What can I do? Maybe it is connected with FTP server not router- I’m using FTP server from my QNAP NAS TS-231P2.

What is you firewall rule configuration for the forward of the FTP from external to NAS ?
Can you provide a snapshot or the text extract of the firewall rule ?

For now I'm only using LuCI for this


fwiw, if you decide to try PASV mode, please be aware there are issues since 18.06 which are solvable if your FTP server is configurable.


(I still use LEDE 17.01.6 for this and other reasons)

1 Like

Try to install kmod-nf-nathelper which may be needed.
Referenced here : Unable to get passive ftp working behind LEDE. nf_conntrack_ftp included?

1 Like

I don't know if kmod-nf-nathelper helped but for sure I found option on FTP server - respond with external IP address and passive port range which i narrow to two addresses which I forwarded and then FTP started working. I'm wonder it is possible to automaticly forward those ports when connection is opened?

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.