HOW-TO: Share iTunes Music Across Networks

My apartment has a WiFi network (using an Airport base station) and a wired LAN with several servers and a few desktops. The Airport has it's own static IP address, on the same subnet as the desktops and servers. Hosts availing themselves of wireless connectivity, however, are assigned IP address on a different, local subnet (192.168.1.*), with the Airport doing NAT for all external connections.

This configuration presents some issues, however, when trying to discover and share services using Bonjour (a.k.a. mDNS), as multicast packets are not relayed across the subnets by the Airport base station.

Here is a simple hack for allowing sharing across the networks for two particular hosts:

  1. Configure Airport to map tunnel and iTunes comm. ports:

    We will map port 10000 for the multicast tunnel and (the default) port 3689 for iTunes sharing.

    Using the Airport Admin Utility, open up the "Port Mapping" panel for your Airport base station, and, using the IP address of the "wireless" host (in this example, add the appropriate port mappings:

  2. Download and install mTunnel on each host.

    mTunnel is a simple UDP unicast tunneler written in Java by Peter Parnes.

  3. Start mTunnel on each host:
  4. Configure mtunnel:

    1. Point a browser to the wireless host at port 9000 to view the mTunnel web admin console.
    2. Create a new tunnel:

    3. Configure the tunnel:

      Set the group field to, the reserved multicast address for mDNS/Bonjour, and the baseport field to the UDP port of 53531

      Name and media fields can be set to whatever you prefer, as they have no effect on the behavior of our tunnel.

    4. Turn ON tunnelling by clicking on the Yes/No toggle link in the tunnel detail page. (it is OFF by default)

  5. In short order, the iTunes applications will discover each other and you will be able to share music across the networks.

1the TCP port for DNS is 53, natch