Enabling Apple AirPlay across subnets/networks

The Bonjour service that Apple AirPlay uses to discover devices is limited to only work on a single network (subnet). However, in a home network with  multiple subnets and or routers AirPlay wont work out of the box.

Here is an example of such a network:

  • router 1 ( – connected to the internet
  • router 2 ( – tunnels all traffic to the internet through a VPN (or other company related traffic)
    • router 2 is connected to router 1 through its wan port and runs as a router (no NAT)

The challenge is to get two apple devices to talk together when one is connected to router 1 and the other connected to router 2. To enable this one has to take a look at the mechanism that Bonjour uses for discovery namely multicast DNS (mDNS).

In my case the routers I used were installed with DD-WRT which is a custom firmware but it didn’t come with anything that could allow me to parse do multicast between my LAN (br0) and WAN (vlan1/[vlan2]).

But I can across this post┬áby Darell that gave a good description of whats needed. Essentially he describes how to compile ‘mdns-repeater’ which is a small tool that can do mDNS between two interfaces in the DD-WRT router.

He also lists Tildesoft.com Bonjour Browser, a useful tool for inspecting Bonjour messages.

Putting the mDNS repreater to work on a DD-WRT device with no space avaliable for storing the program can be achieved through the startup or firewall scrips like:

wget -O /tmp/mdns-repeater && chmod +x /tmp/mdns-repeater && /tmp/mdns-repeater br0 vlan1

To speed up the process a precompied version does exist of mdns-repeater located in the this forum. But can also be downloaded from mdns-repeater.

One comment on “Enabling Apple AirPlay across subnets/networks
  1. David says:

    With recent DD-WRT Software/Firmware (2015) it works out of the box!
    Tried with TP-Link TL-WR841ND v9 & DD-WRT v3.0-r27700 std (08/20/15)

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.