Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS Bonjour Over the Internet

I know that iOS's Bonjour implementation (NSNetService, NSNetServiceBrowser) work out of the box on local networks.

The documentation says it is possible to set up a Bonjour DNS server to allow connecting users over the internet, so my questions are:

  1. What is the Bonjour DNS server interface? is there a sample I can start from?
  2. Does the DNS Server responsible for the initial hand-shaking\connection of the peers and the rest (send\rec data) will be directly between the peers?
  3. Does the DNS Server provide a NAT hole-punching mechanism?

Thanks!

like image 212
sternr Avatar asked Jun 05 '11 07:06

sternr


People also ask

What is Bonjour on Internet?

Overview. Bonjour provides a general method to discover services on a local area network. The software is widely used throughout macOS, and allows users to set up a network without any configuration. As of 2010 it is used to find printers and file-sharing servers.

Does iPhone use Bonjour?

For example, iPhone and iPad devices use Bonjour to discover AirPrint-compatible printers and other devices, and Mac computers use Bonjour to discover AirPlay-compatible devices such as Apple TV. Some apps also use Bonjour for peer-to-peer collaboration and sharing.

Do I need Bonjour?

No, it's not mandatory to have Bonjour on every Windows device. But it's beneficial if you're using Apple products like AppleTV and iPhones while running Windows or Linux on your PC. It helps connect all your devices easily, irrespective of their operating systems.


1 Answers

Bonjour local service discoveryis based on "multicast DNS". whenever some client wants to find out anything about the network or services on the network it uses the multicast address 224.0.0.251, meaning only clients within that multicast group can use bonjour together. the 244.0.0/24 IP-Address space is defined as "Local Network Control Block" by RFC5771 and will not be forwarded out of your local network.

BUT really, Bonjour is just a DNS-based method - you can tell NSServiceBrowser to search in a non-local domain, which just requires the DNS server to respond to specific requests (as described in Manually Adding DNS-SD Service Discovery Records to an Existing Name Server) This allows service discovery over the internet and even service registration if you get DNS Update working (Setting up a Bonjour Name Server), but nothing more - you have to care about hole-punching yourself.

So get yourself a BIND-server and start trying ;)

like image 50
Martin Ullrich Avatar answered Nov 23 '22 19:11

Martin Ullrich