0

This question is for pure curiosity. Lets say I have lighttpd installed on my phone (or any service for that matter). Pinging the ip from my pc results in timed out connection and its clear the iphones internal firewall is non existent (well I believe no anyways). so for an accepted answer you will need to cover these grounds...

  1. If the provider is blocking this traffic, then how does 1 create apps allowing connections through tcp on a listening port over 3g?

  2. How does apples push service / iMessage work to transfere data to the device? Wouldn't this service itself use a tcp protocol listening on a port?

  3. Again if the provider is blocking this traffic, How do they determine its an iphone and not a wireless dongle (which also uses sim cards and I THINK allows connections externally although im not 100% sure).

Reason i ask is because i thought about a web server for the phone which allows administration aswell as location overviews and status etc. but this would be pointless if there was no way too connect, and the issue about dynamic ip would of been overcome by updating the ip address to an external server.

Edhen
  • 345
  • 4
  • 15

1 Answers1

1
  1. Your provider is very likely giving you an IPv4 address that is behind a many-to-one NAT gateway. So they are not blocking your IP address per se, but you won't be able to reach anything inside the NAT from outside the NAT due to the statefulness of many-to-one NAT. Hopefully this situation will change when IPv6 starts becoming popular for mobile phones. As there is no short supply of those IP addresses, there is no need to NAT.

  2. Like every other push service, it's probably actually a connection that it initiated by the phone toward a well-known server on the Internet. The notification server sends notifications down this connection after the phone opens it.

  3. What makes you think they detect (or care) whether a phone, tablet, tethered device, or 3G dongle is connected at the other end of the PDP context?

UPDATE about APNs

It is very possible that your carrier gives a NATted IP address to your phone and a true public IP address to your 3G dongle because they are connecting to different APNs. The name of the APN that the 3G dongle is using may even be a closely guarded secret in order to thwart users who want to get a public IP address for their phone by reconfiguring their phone touse the APN intended for dongles. That APN would be preconfigured inside the dongle and difficult to extract. This would be done because public IP addresses are in limited supply and the carrier doesn't want to waste them on phones (and there are way more phones out there than there are 3G dongles).

The above paragraph is speculative and carrier-dependent, but it seems likely that some carriers would do that.

Celada
  • 21,627
  • 4
  • 64
  • 78
  • thats why i say IF the provider is blocking. But lets say there not or they dont care.. the question for 3 is why 1 could connect to a laptop as such through 3g (dongle) using a same kind off sim, but not an iphone or such even though they are almost exactly the same (both laptop and iphone)... – Edhen Jun 14 '12 at 19:39
  • also for 1, even if its behind the nat, pinging the ip address should still return results should it not? – Edhen Jun 14 '12 at 19:43
  • Re: why one should be able to connect to a laptop but not an iPhone: you're right, it should be the same. Are you sure the 3g dongle and iPhone are using the same access point? Probably they aren't. Re: should ping still work behind NAT: maybe, maybe not, depends on the NAT gateway. – Celada Jun 14 '12 at 20:26
  • Thanks and i accept is as valid because like i said im not 100% sure about the dongle access but i was pretty sure it allowed external connections, anyways your answer gave me more insight. Apart from this i found ssh tunnel too my phone is the way to go and will be more beneficial. I guess this is how the push service would work aswell like you stated... – Edhen Jun 14 '12 at 21:13
  • The more I think about it, the more it seems likely that the dongles would use a different APN. See edits to my answer for additional information. – Celada Jun 14 '12 at 22:08