Not really enterprise IT but somebody might find this useful (including me in a few months if it breaks and I’ve forgotten what I did!)
So you have a QNAP TS series NAS (I have a TS239 Pro II + and very good it is too). You also have an Android phone. You think that it’d be pretty handy to be able to move stuff between the two, and would like to use a secured protocol.
If your NAS is not behind a NAT gateway then it’s easy. If it is then it’s still fairly easy, except that whilst the UPnP stuff on the NAS opens most of the ports you need, it does not open the passive FTP port range. So you need to go to your NAT gateway (possibly your modem/router) and manually add an entry for the range of ports and point them to the IP address of your NAS. If UPnP doesn’t work you also need to forward ports 21 and 22 to the NAS.
I have a Netgear cable modem/router from Virgin Media, and the place to go for the NAT table is Port Forwarding under Advanced. Up until this point you might have quite happily had your NAS running with a DHCP address with no problems (it can become a Master Browser so you can find/map drives to it by name on your home network), and UPnP has been taking care of the NAT port mappings automatically. All is not necessarily lost: the DHCP server (probably built into your router) might have the ability to use address reservations, this means that it will always hand out the same IP address to a device with a specific MAC address (i.e. network card unique identification number). On my Netgear router the stuff to do with DHCP is in the LAN IP section under Advanced.
So on the QNAP NAS I went into Network Services, FTP Service, and unticked FTP and ticked “FTP with SSL/TLS (Explicit)”. Port is left at 21 (default). I’m using the default Passive FTP port range of 55536 – 56559 and I have ticked the “Respond with external IP address for passive FTP connection request” but left the External IP Address box empty. This last step is important as otherwise your FTP client is told to connect to the internal IP address of the NAS rather than the external address of the NAT device (router). If you don’t tick it everything will work fine whilst you’re at home on your WiFi connection, but if you go elsewhere or switch to 3G (etc.) it’ll fail. Finally, within MyCloudNAS Service, Auto Router Configuration, I have ticked “FTP/FTPS with SSL/TLS
Server” which sorts out the UPnP. Oh, and I’m obviously using MyCloudNAS for dynamic DNS so I can find the NAS over the internet if/when the IP address of the cable modem/router changes.
So on to AndFTP on the Android phone. Important settings are as follows:
Type: FTPS (Explicit FTP over TLS/SSL)
On the Advanced tab: Mode: Passive
Back on the General tab, I have ticked “Enable resume support” because I thought it seemed like a good idea, what with a phone being portable and thus likely to have its network connection drop out mid transfer. I’ve yet to test if it actually does anything useful though.
And then you click Connect, and it does, and gives you a list of the files/folder on your NAS and you’re happy.
Think that’s all I had to do, the important bits really are the NAT entries for the high ports and making sure the NAS FTP server responds with the external IP address. If you can’t get it working I might have left something out – let me know and we can compare configurations!