nextcloud / nextcloud/ios

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

Open
#2,825 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Swift
Stars
2.5k
Forks
1k
Avg merge
2d 18h
Merged PRs (30d)
13

Description

⚠️ 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?
  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other
Configuration report

No response

List of activated Apps

No response

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file, test, or entry point is named. Start by reproducing the connection timeout on an iOS device while switching between the external and internal networks, then compare the app's behavior with Safari and inspect the reported erroneous filesystem response. Done means the app connects and browses correctly in both network environments using the same canonical name.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
mobile, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.