I have an EX4 setup to work as a FTP server even when accessing from outside my network. All ports are forwarded correctly and I am able to connect using active mode. I have set the ports to be used for passive mode and confirmed the configuration by viewing the xml files through ssh. However, when an FTP client attempts to go into passive mode by passing the PASV command the server does not reply back with the 227 response as expected. Instead, the server hangs and can accept no more FTP commands.
Now, here’s the interesting part. The FTP server does respond to the extended passive command (EPSV) for IPv6. It replies back with a port in the range I configured and I’m able to connect to the port and data can transfer. I’ve tested this extensively with Wireshark and PuTTY in Raw mode. I’m not sure if this is a bug or not, but if anyone has experienced this and found a solution please let me know. Also, I’d really like to avoid a factory reset or really a reset of any kind.
I have not tried FTP remotely. Due to the nature of FTP WD does not provide technical assistance with issues in regards to FTP. Lets see if another user with experience in this matter can chime a little on this subject.
Make sure you have forwarded the ports on your router and not on the EX4 - that is, configured the port forwarding on your router’s web interface and haven’t done any port forwarding via EX4’s dashboard.
Also, if you are trying from inside the network where the EX4 is kept, when connecting to the EX4 from an ftp client, use your external IP to connect and not internal IP of the EX4.
If this helps you, please click the star under my username to the left of this post to give me a kudo.
All ports on router are configured properly and there are no forwarded ports on the devidce itself. Additionally, using either the internal or external IP from inside the network it responds to the command. But when accessing remotely I get no response. This has been tested in a few different locations, work, coffee shop, 4G network via phone. I’m pretty sure it’s not a routing issue because I’m able to use EPSV (which is the IPv6 passive command). Even though the device isn’t set up for IPv6 when I pass that command the server returns the expected response with a port in the specified range and I am able to extablish a data connection on that port and everything works fine. The hang up is that the device isn’t responding to PASV for some reason. Think the issue may lie with my home router’s firewall so I will double check that. Just curious if anyone else has encountered this issue or not.
I should have mentioned this earlier. It is also possible that your ISP blocks port 21. Mine (Verizon fios) does. So I use port 44 for ftp…which cannot be configured from the gui but only in the xml directly. The gui only allows two non-standard ftp ports to be entered - 2121 and 9921. Try setting it to a non-standard port and see if that works.
If this helps you, please click the star under my username to the left of this post to give me a kudo.
Setting the device to use port 2121 (and forwarding to 2121 on router) did the trick. The weird part is, I don’t have to use a non-standard port externally, as long as I forward port 21 to port 2121 in the router. Since the router is replying back with the PASV command over port 21 I don’t think this is an issue with the router or ISP. The issue only occurs when the ftp server receives the command on port 21. Switching to port 2121 and 9921 both corrected the issue. Pretty sure this means there is a bug with the code on the device which handles FTP. Most likely in the Pure-ftpd config files which I haven’t been able to find. Suggest WD take a look at this bug since it is clearly not working as intended. Thanks Cybernut1, this was driving me crazy.