Can't connect to FTP server when I'm connected via hotspot

I need to connect to my webserver via FTP from my MacOS (13.4.1). When I'm connected via home internet provider, everything is OK. But when I connect via hotspot from my iPhone (iOS 17), I can't connect to FTP. The error message is "Connection timeout". The Internet in web browser is working perfectly, but FTP connection doesn't work. I tried several FTP clients (Filezilla, Forklift, ...), but still the same problem. 

 

A few weeks ago, I used this FTP clients without any problem with hotspot, so maybe it could be related with iOS 17 update. 

 

Has anyone same problem? Is there any possibility to analyze network settings to find out where could be the problem? I tried to switch off the Firewall on MacOS, but no change...

 

Thanks.

iPhone 13 Pro, iOS 17

Posted on Sep 20, 2023 4:30 AM

Reply
62 replies

Sep 20, 2023 5:46 AM in response to Tomas009

As I understand it, it is probably not a problem with using ftp, but with finding the server. You said personal - as in it is in your home network? This would explain why you can't reach it.

How are you accessing the server - using an IP address like 192.168.*.*? using a domain name?


If you are trying to access something in your home from outside (and note that even if you are at home, using the phone hotstop you are *outside* your home network) there are a number of things that need to be done in preparation.


Please clarify the above and we can try to give you instructions for making it work.

Sep 20, 2023 7:38 AM in response to Tomas009

Tomas009 wrote:

No, it's FTP server at commercial web hosting company, not in my home network. I have more web hostings in various companies and the problem is the same.

I'm trying to connect via domain name, but I've also tried to connect via IP address. Still timeout...

Thank you

Maybe your cell provider's hotspot plan does not include ftp.

Sep 20, 2023 8:24 AM in response to Tomas009

Being older than IP networking itself (yes, really), and its pattern of connections is fundamentally incompatible with modern network firewalls, and being wildly insecure, FTP quite often causes issues, and increasingly often simply gets blocked.


To get FTP to work with a firewall, one or both firewalls (on the local network, and in the remote network) must scan the FTP traffic and preemptively open up the second port. The direction of this second connection depends on whether the FTP connection is operating in active or passive mode. But it’ll always run into a firewall, if the firewall isn’t configured to scan FTP traffic.


(This second data connection used by FTP usually uses an ephemeral port selected at run-time, so there’s no way a firewall can predict that without communications with the FTP server or FTP client, which means either opening up the entire ephemeral range, or configuring the FTP server to use a particular sub-range and opening that, or (as is common on middling and higher-spec firewalls) scanning the passing FTP traffic.)


As FTP openly leaks the server credentials in cleartext, the recipient firewall and recipient FTP server need to process and relocate the arriving files too, as the server can otherwise become filled with unwanted or illegal files.


If you need file uploads with your web server, use HTTPS file uploads, or configure and use SFTP.


If you really need FTP, set up a VPN to wrap the connection; that VPN might be L2TP/IPSec, or maybe FTPS.


PS: also learn about Gifar and other types of polyglot files, particularly if you’re exposing potentially untrusted uploaded files.

Sep 21, 2023 5:42 AM in response to Rudegar

Yes, that was exactly what I did today. FTP client on iOS works perfectly in both cases - on wifi just as using cellular. That means there is no problem with my carrier, but with hotspot - connection between iPhone and MacOS.


Isn't is possible it's related to the update to iOS 17? A few weeks ago it worked normally via hotspot. At that time I had iOS 16.

Sep 21, 2023 8:14 AM in response to Tomas009

Tomas009 wrote:

Sorry, but no useful answer yet. Does anybody have an idea? I tried active/passive mode, I also tried to connect via SFTP. But still the same. Connection via home provider is without any problem. But when I want to connect via hotspot from iPhone, connection timeout.

Thank you.


Check with your carrier, as they appear to be blocking both FTP and SFTP.


Sep 22, 2023 12:33 AM in response to MrHoffman

I called with the support of my carrier and they are not blocking FTP. They assured me that if the problem was on their side, the FTP would not work completely. Not even in iOS app. But in my case, FTP in iOS works, but the problem is only with using hotspot. I'm not able to connect to FTP from my MacBook if it's connected via hotspot.

Sep 22, 2023 6:30 AM in response to Tomas009

Tomas009 wrote:

I called with the support of my carrier and they are not blocking FTP. They assured me that if the problem was on their side, the FTP would not work completely. Not even in iOS app. But in my case, FTP in iOS works, but the problem is only with using hotspot. I'm not able to connect to FTP from my MacBook if it's connected via hotspot.


Connect something with network diagnostics into the network connection, and run a port scan, and see which ports are open and active, and see if that matches the expected open-port pattern of your server. iPhone and iPad are bad at network diagnostics, though there are some (increasingly-limited) scanning tools available. macOS, Linux, BSD, Windows, all are better at this task. Poke into TCP 80 via telnet (less desirable) or s_client or such via TCP 443, if there is a web server, and check the server response, too.


And I’d forget I ever saw or even knew about FTP. Each time I might recall knowing about FTP, just review the hilarity that is the connection pattern. If I really, really, really, really wanted FTP, I’d set up a VPN (end-to-end, not the less-than-useful over-hyped first-few-hope VPN stuff) into the server.

Sep 23, 2023 11:52 AM in response to Tomas009

I am having the exact same problem, on 2 different computers using 2 different operating systems. Nothing has changed on either system, the only thing that has changes is I updated my phone to iOS 17 (now 17.0.1). I am a photojournalist, and often need to upload photos to different news organizations servers. Before the update, everything was fine. Now, I can't access any of my business client's servers even though my computers are on the internet. This is NOT small problem. I need to get these images into their servers as quickly as possible, and not getting them in is a major problem. Last night I covered a HS football game, and could not log into their server and had to email the photos which slows down their process and looks bad on me. Like I said, nothing has changed except for the iOS. The computer sees the server, and attempts to login, but times out. This NEEDS to be fixed!

Can't connect to FTP server when I'm connected via hotspot

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.