views:

52

answers:

3

I have an iPhone app which relies on connecting via the local network to a server running on a user's mac/pc.

The server is running an http service on port 8080

I already add exceptions to the default windows firewall, or the default mac firewall to ensure traffic is allowed to reach my app.

However the most common customer issue is that the iPhone can't communicate with the server.

Normally this is the network router blocking traffic - though sometimes the user is running their own firewall which blocks the traffic.

Is there a protocol which will let me say something to the effect of

'will all the firewalls on this network, please allow communication to on if the traffic originates within this network?'

I have looked into upnp - but that seems to concentrate on opening a port to the outside world which I don't want to do.

suggestions?

thanks in advance.

A: 

No, there is no such way or protocol aside from UPnP. And I wouldn't recommend it anyway because in company networks it would cause all sorts of problems and security issues if this were possible.

I'd suggest that you set up a FAQ entry or installation section for your software where you describe this common issue and give details to the customers how they can detect and solve this problem.

Kosi2801
I have done the faq thing - but trying to get non-technical customers to configure the firewalls on their routers is non-trivial.Frankly - it isn't the sort of thing they should have to do to get applications working (find the way to acess your web interface, figure out what strange term your router uses to describe a firewall, etc).Users have an expectation that apps should 'just work'...
Confused Vorlon
Of course. But firewalls are there for a reason. Imagine what would happen, if such a thing would be possible: viruses or trojans would reconfigure routers to allow them access to other, protected networks and the security thread would be hard to get under control. Be assured, you're not the only developer with this problem. On the other side, users with firewalls will not only have difficultis with YOUR application but with many others as well.
Kosi2801
A: 

In general, higher ports (above 8000 or 16000) are not blocked or firewalled. I would seriously consider allocating a random port in that range.

Also, consider to advertise your service with Bonjour. Using Bonjour has the nice side-effect that your iPhone app does not have to know the port number. It can simply browse the network for available servers. If there is just one then connect to that, otherwise present the user with a list to choose.

St3fan
I do advertise by bonjour - and that does help discovery.-but I still have the problem of actually communicating when I know where the service is!by default, this app uses 8080, so that meets at least part of your 'high port' definition.good to know that high is good though - I'll use that for my other apps.
Confused Vorlon
A: 

Is there any way to run the server on port 80? You're likely to encounter fewer issues on a standard port.

Paolo
good suggestion - thanks. That may be possible, though I'd worry about conflicting services.
Confused Vorlon