Sunday, August 5, 2012

Sharing iTunes Library over VPN

I have a very nice music library on my home Mac (iTunes). I share this library so when I'm at home, I can play music from the library from my laptop, mobile devices or even AppleTV. However, when I'm at work, the library is not visible, even though I have a VPN connection to my home (the server where iTunes is running is accessible).

I will not go through on how to set up a VPN connection to your home - as it highly depends on your router at home and other factors. If your router does not support VPN, SSH tunneling is probably your best bet. In this case, some of the instructions below may slightly defer.

As my server is already sharing my library at home, there is nothing I need to do on the server.

Windows


Generally, all you need is Bonjour-Beacon. Download the zip file, extract it somewhere and then launch BonjourBeacon.jar from the extracted directory. This tool publishes ZeroConf (aka Bonjour) services that the computer it is running on provides. In this case we want to publish that your computer provides iTunes Library Sharing service (daap). This service runs on TCP port 3689. Bonjour-Beacon doesn't of course provides this service but what it does is that whenever someone tries to access the service it publishes, it will forward the connection (kind of like proxy) to a different server that does provide the real service. In our case that will be the IP of the computer where the iTunes library is shared.



Here's an example of how to configure Bonjour-Beacon to redirect iTunes library sharing to another computer:

Profile Name:  type any text to describe your library
Host Name:     localhost
               NOTE:  From my experience, this has no meaning
                      except that it will show on your local
                      iTunes before you actually access the
                      remote library
Host MAC:      leave empty
Host IP:       type in the IP of the computer that has the
               library you want to share
Password:      false
Local OS:      Choose your OS (from my experience, you can choose
               anything here)
Protocol/Port: _daap._tcp./3689

The most important settings are Host IP and Protocol/Port. These essentially publish the service on your local network and tells Bonjour Beacon where to forward connections to the published service.

Once done, click the 'Add New' button to add the service. This will add the service but will not publish it just yet. To publish, click the 'Start' button:

That's it. Launch iTunes and you should see the library on the left pane under SHARED. Click it, and your remote library will load (time will depend on your library size and connection speed on both sides of the VPN tunnel).


Mac

Similar to Windows, you'll need software to proxy Bonjour from your local network over to your iTunes server accessible through VPN. For Mac, you'll need Network Beacon. The download button did not work for me. To download, click the 'Home' link on the left and then you'll have a direct download link on the right. Currently, this points to this link.

Once downloaded, open the .dmg files and launch Network Beacon.app. You may want to copy it to your Applications folder for future use.



The configuration is similar to Windows:
Service Name:   Text to describe the service being published (you
                can write any text)
Service Type:   _daap._tcp.
Port Number:    3689
Text Record:    leave empty
Host Name:      the host name of the computer that is sharing the
                iTunes library
IP Address:     the IP address of the computer that is sharing
                the iTunes library

Make sure both "Beacon Enabled" and "Enable Host Proxy" are checked.


Happy playing.


[29/Nov/2012 Update]

Troubleshooting iTunes Library Sharing

My Library sharing, either on LAN or VPN as described above, stopped working on one of my Windows 7 machines. It did work and then it stopped. I tried may things, including:

  • Disabling the firewall
  • Rebooting the Sharing machine and my Windows machine
  • Making sure Home sharing is enabled (not important but still)
  • Verifying both are running the same version of iTunes
  • Different launch sequences
  • Many combinations of the above
I believe, today after leaving the problem as it is for a while now, I found the root cause of the problem. My network connection is configured as a Home network as it should be (I'm at home...). However, I had recently refreshed my VMware Workstation to the latest version. It added a few network adapters (VMnet1 and VMnet8), used for host only and NAT between VMs (guests) and the host (my native Windows 7). Although no VM was running, those interfaces are enabled.

I noticed that in Control Panel -> Network and Internet -> Network and Sharing Center my PC is connected to the internet via "Multiple Networks" (map at the top of the page). I disabled the two virtual interfaces (one way of doing this is clicking 'Change adapter settings' on the left pane and then right clicking an interface and choosing 'Disable'). The map at the top of the page now correctly showed that I'm connected to the internet via a Home network. I quit iTunes and re-launched it and voila! Home Sharing now shows my shared library.

38 comments:

  1. Hi

    I haven been searching for this fix. I am using windows 7 as a VPN while I connect via iPad through 3G.

    After I setup Beacon Bonjour on my PC (which also host the VPN & iTunes Home Sharing for Music), I still can't see my Shared Library on my iPad Music app.

    Any idea where went wrong? (Or is this solution for the client PC instead? which requires my iPad to probably have a iPad version of Beacon Bonjour?)

    Thanks.

    ReplyDelete
  2. The solution I suggested works locally only, meaning it allows your PC or Mac to connect to a remote library via the beacon running on the same machine. While theoretically it should be possible to have the beacon used to publish the remote library to other machines on _the same network_ (iOS devices included), I haven't tried it. I will update the post if I find the time to look into this.

    Amir.

    ReplyDelete
  3. Hi you will need a vpn that forward multicast. You can install openvpn on a windows machine or linux.

    Here is an explanation of it.

    http://www.wedebugyou.com/2013/01/how-to-use-bonjour-over-vpn/

    cheers

    Jean

    ReplyDelete
  4. Thanks for taking the time to discuss this, I feel strongly that love and read more on this topic. If possible, such as gain knowledge, would you mind updating your blog with additional information? It is very useful for me. pure vpn

    ReplyDelete
  5. Because, really it's important to have all the info for all your music in your iTunes. You need to have all of that fixed in iTunes!
    iTunes free gift card

    ReplyDelete
  6. Now that's too many. I only need one Enjoy The Silence mp3 by Depeche Mode not 6 from 6 different CDs. That's 5 too many! And 5 additional copies of those mp3s is about 50 extra megabytes that's taking up space on my computer hard drive.
    Delaware gap camping

    ReplyDelete
  7. Free VPN providers usually log all activities along with other features while the paid VPN service providers understand your privacy requirements and may or may not log activity depending on the company. VPN service

    ReplyDelete
  8. Interesting topic for a blog. I have been searching the Internet for fun and came upon your website. Fabulous post. Thanks a ton for sharing your knowledge! It is great to see that some people still put in an effort into managing their websites. I'll be sure to check back again real soon. WWW

    ReplyDelete
  9. In the succeeding passages, we will improve this nerd sounding errand into something that the regular person can take after.https://novavpn.com/blog/yify/

    ReplyDelete
  10. Awesome things you've generally imparted to us. Simply continue written work this sort of posts.The time which was squandered in going for educational cost now it can be utilized for studies.Thanks https://privacyenbescherming.nl

    ReplyDelete
  11. In fact your creative writing abilities has inspired me to start my own Blog Engine blog now. Really the blogging is spreading its wings rapidly. Your write up is a fine example of it privatnostonline

    ReplyDelete
  12. A simple bookmarking tool that makes it easy to save, organize and share your favorite web pages. Access your bookmarks from any computer, phone or tablet. Listango works on all modern web browsers… https://internetprivatsphare.ch

    ReplyDelete
  13. Really your blog is very interesting.... it contains great and unique information. I enjoyed to visiting your blog. Its just amazing.... Thanks very much. visit site

    ReplyDelete
  14. Incredible articles and awesome design. Your blog entry merits the greater part of the positive input it"s been getting. diebestenvpn.ch

    ReplyDelete
  15. I really like your blog. Great article. It's most evident, people should learn before they are able to privacy online

    ReplyDelete
  16. Is it accurate to say that you are perusing on your cell phone? Is it accurate to say that you are perusing at school or work? https://www.router-reset.com/how-flush-dns-cache/

    ReplyDelete
  17. You've completed in excellent work. t suggest to my frtends ind personilly wtll certitnly dtgtt. t'm conftdent they'll be gitned from thts webstte. the best vpn uk

    ReplyDelete
  18. Intriguing post. I Have Been pondering about this issue, so much obliged for posting. Really cool post.It "s truly extremely pleasant and Useful post.Thanks https://gizlilikveguvenlik.com/netflix-usa/

    ReplyDelete
  19. Your work here on this blog has been top notch from day 1. You've been continously providing amazing articles for us all to read and I just hope that you keep it going on in the future as well. Cheers! best vpn

    ReplyDelete
  20. Extremely pleasant article, I appreciated perusing your post, exceptionally decent share, I need to twit this to my adherents. Much appreciated!.  vpn veteran

    ReplyDelete
  21. This comment has been removed by the author.

    ReplyDelete
  22.  A portable fish finder is a good choice if you don't fish from the same ship all the time. vpnveteran

    ReplyDelete
  23. I felt exceptionally glad while perusing this site. This was truly exceptionally enlightening site for me. I truly preferred it. This was truly a sincere post. Much obliged!.  Mehr Informationen

    ReplyDelete
  24. I truly welcome this superb post that you have accommodated us. I guarantee this would be valuable for the vast majority of the general population. internetprivatsphare

    ReplyDelete
  25. Excellent .. Amazing .. I’ll bookmark your blog and take the feeds also…I’m happy to find so many useful info here in the post, we need work out more techniques in this regard, thanks for sharing.  https://www.lemigliorivpn.com

    ReplyDelete
  26. This is very smart, really an intelligent idea. This is my first time in your blog and I really love it. Thanks for this awesome post. meer informatie

    ReplyDelete
  27. A very awesome blog post. We are really grateful for your blog post. You will find a lot of approaches after visiting your post. I was exactly searching for. Thanks for such post and please keep it up. Great work Klik hier

    ReplyDelete
  28. This article gives the light in which we can watch the truth. This is exceptionally decent one and gives indepth data. A debt of gratitude is in order for this decent article.  privacy in the network

    ReplyDelete
  29. I definitely enjoying every little bit of it. It is a great website and nice share. I want to thank you. Good job! You guys do a great blog, and have some great contents. Keep up the good work. Privacy Online

    ReplyDelete
  30. I really like your take on the issue. I now have a clear idea on what this matter is all about.. nord vpn free trial

    ReplyDelete
  31. To determine this traffic issue VPS hosting is the most fitting hosting plan. At the point when your website traffic builds, VPS will make another cloud by procuring more assets accessible in the system and sidetracks the traffic to the next cloud.bitcoin

    ReplyDelete
  32. Presently your Virtual Server acts simply like your committed server. Information is put on a VPS as a Virtual Machine otherwise called VM.SSD VPS

    ReplyDelete
  33. You should always change your router's default username and password by going router setting.

    ReplyDelete
  34. You should always change your router's default username and password by going router setting.

    ReplyDelete
  35. This online journal is so pleasant to me. I will continue coming here over and over. Visit my connection too.. 3d product designer

    ReplyDelete
  36. Rajshahi it center BD offers quality online courses in Bangladesh as the best outsourcing training institute. Learn Online, develop skills & build a strong career ...

    ReplyDelete