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:
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 192.168.1.2), add the appropriate port mappings:
Download and install mTunnel on each host.
mTunnel is a simple UDP unicast tunneler written in Java by Peter Parnes.
on the LAN host, pass in the static IP or hostname of the Airport base station and the port mapped for NAT pass through: mtunnel airport.hccp.org/10000
on the wireless host, pass in the static IP or hostname of the LAN host and the configured port: mtunnel lan-desktop.hccp.org/10000
Set the group field to 126.96.36.199, 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.
1the TCP port for DNS is 53, natch