How to port forward passive FTP from a router
14,003
You need to:
- Forward the FTP control connection port 21.
- Forward the passive mode data connection port range (server-specific, usually configurable).
- Configure your FTP server with the external IP address of the router, so that the server reports the correct address to the clients.
Some references:
My article on network configuration for FTP modes;
My answer to Connection to FileZilla FTP server works, but directory listing fails.
Author by
WholesomeGhost
Matt, 18, Programmer and PC enthusiast by day, Suicidal maniac by night
Updated on September 18, 2022Comments
-
WholesomeGhost over 1 year
I have a TP-Link archer c7 that I use as an access point connected to my ZTE mf283 router. To my TP-Link ac I have connected a 250GB external HDD which I use as storage for my FTP server that I set up on my TP-Link router.
That works great on my local network but I wanna be able to connect to my router from outside my network so I tried portforwarding but I soon found that that I need to use passive FTP. Now I understand theory more or less but how can I set that up so that it works?
-
Admin over 6 yearsAs long as the port forwarding is correct, what works from inside works from outside as well. Meaning: No changes required except IP address which is your public IP address and the same port and same authentication if required.
-
Martin Prikryl over 6 years@MichaelBay That's not completely true for FTP - You need to configure the FTP server with the external IP address in addition to port forwarding.
-
some user over 6 yearsFTP is insecure and your username and password is sent via cleartext. This is especially dangerous when doing this from public network. I suggest you switch to SCP/SFTP ASAP, a lot easier to port forward too.
-
WholesomeGhost over 6 years@someuser I heard that suggestion a lot but how do I do that?
-
some user over 6 yearsI doubt your TP-Link supports SCP/SFTP. One alternative is use an open source router that runs DD-WRT which supports SSH and FTP. You can also get a dedicated device like pogoplug or raspberry pi to act as a server for your external HDD. And then you can port forward traffic to this device. Both solution takes time though.
-
WholesomeGhost over 6 years@someuser but is there a way to just set it up through regular ftp?
-
Martin Prikryl over 6 yearsFTP has a secure variant, the FTPS - FTP over TLS/SSL. Maybe your router supports that too.
-