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...
If the provider is blocking this traffic, then how does 1 create apps allowing connections through tcp on a listening port over 3g?
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?
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.