nextcloud / ios

📱 Nextcloud iOS App
https://itunes.apple.com/us/app/nextcloud/id1125420102
GNU General Public License v3.0
1.89k stars 862 forks source link

[Bug]: iOS client app not working inside a firewall internal network, works via external network only #2825

Open spotter-net opened 4 months ago

spotter-net commented 4 months ago

⚠️ This issue respects the following points: ⚠️

Bug description

iOS app fully works via external / outside firewall connection. Safaris connects correctly using external ip and cloud website works as expected.

iOS app times out from connecting when connected inside a firewall. Safari connects correctly using internal ip and cloud website works as expected.

Canonical name cloud.spotter.net resolves to public ip address outside firewall Canonical name cloud.spotter.net resolves to private ip address inside firewall

My suspicion is that the app is caching an external dns resolution or hardcoding the ip in some fashion.

Steps to reproduce

  1. Deploy a private nextcloud server on a private ip firewalled network and provide port forwarded access via an external router with a public ip.
  2. Set up domain dns with resolution to public ip address of external router. eg. cloud.spotter.net via spotter.net domain
  3. Provide dns overide on internal networks dns server to resolve same canonical to the private ip (that is forwarded to via the external router)
  4. Connect iOS device to an external network outside firewalled network - connect to server (should work as expected)
  5. Connect iOS device to the internal firwalled network - app fails to connect - times out and produces erroneous messages like "no files here" when browsing filesystem.

Expected behavior

Expected behaviour is to have the iOS app correctly when connected to an external network and accessing the server via public IP AND when the iOS app is connected to the internal firewalled network and using a internal private ip that it connects to the server using the server's internal network IP resolved via a canonical address being resolved by the internal networks DNS services. IE externally the canonical name resolves to a public ip, internally the canonical name resolves to a private ip.

e.g. App should work as web browsers do - Safari works as expected accessing the cloud server using the canonical name whether the ios device is connected via an external network or connected to internal network.

Installation method

None

Nextcloud Server version

26

Operating system

None

PHP engine version

None

Web server

None

Database engine version

None

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

Configuration report

No response

List of activated Apps

No response

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

marinofaggiana commented 4 months ago

Hi, I don't understand what the application doesn't do or what it should do that it doesn't already do. DNS should resolve the IPs, we all use the same name inside the net and outside...so I don't see what it's supposed to do. The apps use the normal IP stack they don't do anything else. any anomaly must be verified by the network policies and not by the app

cclarke591 commented 3 months ago

What is your setup like for the network itself? I had issues like this before, but it was based around how I was setting up HAProxy.

Are you using DNS? Have you tried uninstalling the app, reinstalling, then connecting the app to the server from internal ONLY?