iPhone UPNP Port mapping - iphone

Has anyone found a method to port forward an internal IP with iOS.
Note: Have tried CyberLink, Platinum, MiniUPNP, upnpx, TCMPortMapper with out success.

Take a look at DNSServiceNATPortMappingCreate() in usr/include/dns_sd.h of the iOS SDK.

Related

iOS / Mac Bonjour service not found on network

I have an iOS app that publishes a Bonjour service. On my network, the Mac app recognizes the service and everything runs smoothly. On some networks however, the Bonjour service is not "seen" by the Mac. I can't reproduce this on my own network. I have had users check for the service using Bonjour Browser and it's not found. Is there a way to diagnose this problem further? I thought it might be a firewall / router issue but some users have very simple Apple-based networks (Airport). Any ideas on what could be causing this?
Have you tried implementing the
- (void)netService:(NSNetService *)sender didNotPublish:(NSDictionary *)errorDict
method? it can occasionally provide useful information although I have found the NSNetService to have strange behaviour sometimes also. Stopping the NSNetService and re-publishing is an ugly option which seemed to work for me to some extent.
Make sure you implement ...didNotPublish... as above. Some routers filter out multicast packets, and unfortunately if you don't control the network there's not an awful lot you can do about it.
Another followup: modifying the device name seems to resolve the issue. One user noted that his iPad was discovered but not his iPhone. Bonjour Browser confirmed the presence of the iPad service with no iPhone service. Renaming the iPhone resolved the issue. This is truly an odd behavior.

Can we create a Firewall application for iPhone (iOS 4.x)

I am looking for intercepting all TCP traffic on iPhone (iOS 4.x). I have searched on iOS Developer Library but could not find anything.
I want to create a standalone application that would run in background (as Firewall). This application should intercept all TCP traffic, no matter which application has initiated it (Safari, Mail etc.). Is it possible on iPhone?
On iPhone can we somehow redirect all network traffic to Loopback-URL (localhost)?
Thanks!
Not even slightly possible on a normal iPhone, sorry!
It might be possible if it's jailbroken but even then, I'm not sure.
Of course it is possible on JB devices and as a matter of fact they already released on Cydia an app called Firewall iP by Yllier and it does the job great with all TCP and UDP communication.

How can I simplify addressing an iOS device using Bonjour?

I would like to make an application for iOS devices that would communicate with a special type of remote device using HTTP POST requests. The problem is that this device would actually act in the role of a client, while iOS device has to be the server accepting the requests. The next problem, host name and port has to be configured statically at the device sending the requests.
While I'm aware it's possible to give it a try using Dynamic DNS services and UPnP/IGD or NAT-PMP to overcome the problem with iOS device being behind the NAT router, I was wondering whether using Bonjour could simplify the problem in some way. I'm quite a newbie in networking so I'm looking for the direction and want to avoid research of Bonjour if it's not going to bring me anything.
Any other idea of how to solve the problem is appreciated as well.
I had a think about this. IMHO you can't guarantee you'll always be able to expose an iOS based service over a WAN (although it's possible) so this isn't practical.
The best solution I suggest is using uPNP to open the device behind a router to the outside world, then have it send an iOS push notification to the iPhone with the details (hostname, ip, port, etc).
The iPhone would then would then have to set up some kind of persistent connection with the firewalled device to receive data.
Bonjour is a good system to discover and connect to services/clients, but only on your local network. I don't think it is a good idea to try it over the internet.

How can I know the IP address of my iPhone simulator?

How can I know the IP address of my iPhone simulator?
It will have the same IP addresses as the computer you’re running it on.
Jep, like Todd said, the same as your machines IP. You can also simply visit http://www.whatismyip.com with mobile Safari or your Mac's web browser ;-)
I think the by visiting the website http://www.test-ipv6.com/ is also a good choice. As the site tells you both the ipv4 and ipv6 global-unicast address

Question about using Bonjour or other methods to secure a connection with a non computer device

So I have a project I am working on, and I would basically like to send a basic yes/no command from the iPhone to a wifi enabled device that is also connectedto the network on the same router. This other device is not a computer, so I am wondering if I can still use Bonjour? In order to use Bonjour, do both of the communicating devices need to have some sort of a script installed and running that is allowing them to communicate? What would be the best way to connect to this device that is connected to the router, and then to send information/commands to it? I could really use some help finding a direction, because once I identify which tools I need to use, I can research them out and get it done (maybe). If anyone could offer any insight/suggestions whatsoever, it would be greatly appreciated!! Thanks in advance
Bonjour is a local service discovery protocol based on multicast DNS. Even if your device supports it you still need some piece of software on the device to listen to your commands.