Now we have an iPhone app which depends closely on TCP/IP communication within the native community. Subsequently, the applying begins a server socket and accepts incoming connections. This labored flawlessly for a very long time and we had no issues with this.
Drawback
Within the final days nevertheless, we noticed that for some iPhones with the server function different units can not hook up with the server of our app. The server doesn’t settle for incoming connections on the units IP handle and the consumer occasions out.
Atmosphere
Each iPhones (the server and the consumer) are in the identical community with 192.168.1.0
handle vary and 255.255.255.0
subnet masks. The server has the IP 192.168.1.11
and the consumer has 192.168.1.22
. This can be a regular dwelling WiFi community with no particular firewall guidelines. Each units have cellular information disabled and the “entry native community” permission is granted. The server socket is certain to all interfaces (0.0.0.0
).
Extra technical signs
When the server iPhone is on this defective state, it looks like it someway has two ip addresses:192.168.2.123
and 192.168.1.11
The WiFi preferences report the .1.11
ip handle. The Apps nevertheless see the .2.123
ip handle. I can not clarify the place the opposite ip handle comes from and why the gadget thinks it has this ip handle.
I’ve collected interface analysis data on a defective iPhone and it listed the next interfaces and IPs:
en0
->192.168.2.123
lo0
->127.0.0.1
pdp_ip0
(mobile) ->192.0.0.2
pdp_ip1
topdp_ip6
(mobile) ->-/-
ipsec0
toipsec6
(vpn) ->-/-
llw0
(vpn) ->-/-
awdl0
->-/-
anpi0
->-/-
ap1
->-/-
XHC0
->-/-
en1
anden2
(wired) ->-/-
utun0
toutun2
(vpn) ->-/-
The proper ip of the gadget is not listed anyplace on this checklist.
A reboot helped to quickly repair this drawback. One person reported the identical subject once more a couple of hours later after a reboot. Switching off WiFi and reconnecting doesn’t resolve the issue.
This subject occurred on a number of iPhones with the next specs:
- iOS Model 18.1.1, 18.3.1
- iPhone 13 Professional, iPhone 13 Professional Max, iPhone 15 Professional
The issue should be on the server aspect because the consumer can efficiently hook up with some other gadget in the identical community.
Query(s)
- The place does this second IP come from and why does the server not settle for connections to both ip regardless that it’s certain to
0.0.0.0
? - Are there any iOS system settings which may result in this drawback? (privateness setting, vpn, …)
- What might be completed to completely repair this subject?