Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

DenBeke

macrumors regular
Original poster
Aug 11, 2011
192
8
Antwerp
I configured the L2TP VPN server on my macOS server in a way that the connected client gets an IP in the same range as OS X server (and my router and other Macs).
I was hoping that — since the computers are in the same subnet — Bonjour would work on the VPN and that I could use Airprint/Airplay and other services on the machine that's connected with VPN.

But this isn't the case... Any hints on this?
 
In short: Bonjour (aka mDNS) relies on broadcast packets, which are packages of information that are 'broadcast' to all devices on a local network. Broadcast packets are usually ignored by VPN, only packets that are destined for a specific device on either end are passed through the tunnel.

You could do a Google search on 'Wide Area Bonjour', which is designed for use on large networks where there are more than one subnet/broadcast domain. It is a bit of a pain to setup, and I don't even know if it can be made to work reliably over a VPN connection.

Your best bet is to assign static IPs and/or DNS names to the devices you want to use on the server side of the tunnel. You'll be out of luck for AirPlay, but printing you can do via IP, either directly to the printer or via printer sharing in OS X. For iOS devices, there is a great app called Printer Pro that is great for IP based printing on iOS.
 
  • Like
Reactions: hobowankenobi
@indiekiduk did you use _daap._tcp. or _home-sharing._tcp.?
I could get it working, if I use _daap._tcp and a Mac in the VPN. But the iPhone uses _home-sharing._tcp but I didn't get it to work...
 
I'm using Network Beacon to create a virtual bonjour service with the IP of the machine in the VPN. This allows connecting to the remote iTunes library.

indiekiduk,

Could you send me a link for Network Beacon? I can't find it anywhere and I'd like to start using it for my VPN and broadcasting Bonjour services.

Thanks!
 
@eric.blair you could use 'dns-sd -Z _daap local' to discover the service on your network. after that you could run on i.e. a MacBook connected via VPN the following command:
dns-sd -P NameOfLibrary _daap._tcp. local 3689 HOSTNAME.local IPaddress txtvers=... 'iTSh Version=...' MID=... 'Database ID=...' dmv=... Version=... OSsi=... 'Machine Name=...' 'Media Kinds Shared=...' 'Machine ID=...' Password=...
Replace '...' with the values you get from the first command. Of course you have to enter the correct IP-Address and hostname of your Computer running the shared iTunes library.
I don't know if all parameters are required to run it successfully, but if you set up all routes, etc. correctly you should be able to connect to the library.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.