<% HideAdds = 1;%>

Have you seen my other iTunes How To? it's really good.

How to: Podcast with iTunes and Movable Type

UPDATE 30/11/2005 - New Note on iTunes 5x & 6x (see bottom of post)
UPDATE 18/09.2006 - I haven't even tried this with iTunes 7x Best of luck
UPDATE 19/09.2006 - According to Steve it works with 7.0 which is great news





After much frustration, I've finally set up my new mac mini to stream all my music to my work laptop. I say frustration, because whilst there is plenty of help out there, none of it in itself was complete enough to get me up and running. Some where too mac to mac, some to unix to mac, some unix to windows. Nothing really gave me the step by step, follow this and it will work guide.

So, I present "The definitive guide to setting up iTunes streaming via the internet from a Mac running OSX to your PC running windows". Phew that’s a mouthful.

The Short Guide

  1. Turn iTunes sharing on

  2. Turn on remote login

  3. Open up the Mac firewall on ports 22 & 3689

  4. Forward port 22 on your router to your Mac

  5. Download and install SSHTunnelClient

  6. Setup a SSH Tunnel from your PC to your Mac

  7. Download and install Rendezvous Proxy

  8. Setup an iTunes daap listener

  9. Open up the PC firewall on port 3689

  10. Open iTunes, listen to music over the internet

Essentially what we are going to do, is create a SSH tunnel between the local (windows) and the remote (mac) machines. When then fool the local machine into thinking that the remote machine is local, and whammo we have music.




The Long Guide

  1. Turn iTunes sharing on, so that iTunes can stream music out.
    Open iTunes, go to preferences, go to sharing. Click "Share my music" and choose to share your whole library or only selected playlists, as you like. Give it a name (and a password if you like) and you're good to go.
  2. Turn on remote login, so that we can access the Mac over the internet.
    Go to System Preferences, go to Sharing. Under Services make sure "Remote Login" is checked. This essentially turns on the Macs built in SSH service/daemon, because it's Unix under the hood after all.
  3. Open up the Mac firewall on ports 22 & 3689, so that we don't get rejected accessing the Mac or the iTunes stream.
    Go to System Preferences, go to Sharing. Under Firewall make sure it's either off (highly unadvisable) or that "Remote Login - SSH (22)" and "iTunes Music Sharing (3689)" are checked.
  4. Forward port 22 on your router to your Mac, so that we can get through the NATing most routers do.
    Log onto your router and find the NAT settings. Set up your router to forward any traffic coming in externally on port 22 to go to your Mac. On my router this involves putting in my external IP address (found using whatismyip, port 22, my internal IP (which I've set in the router DHCP not to expire) and port 22. Now if your broadband provider gives you an dynamic non sticky IP address, you'll have to change this when it changes. Also if you're using DHCP internally, either configure you Mac manually with an IP address or configure your router not to expire the Mac's IP address. I'm assuming you're running a DSL or Cable connection and using NAT to connect your machines at home. If not make sure that hitting your home network on port 22 hits the Mac on port 22.
  5. Download and install SSHTunnelClient, so that we can easily create an SSH tunnel. Think of this tunnel as a virtual pipe between the two machines. Now we can either set it up manually using command line applications like putty or plink, or we can install cygwin and run ssh 'natively'. However this is like serious hassle, and I've always preferred a good GUI. Not withstanding some bits of the application being in German, SSHTunnelClient is a very good app. Easy to use and minimizes to the system tray means there is no need to leave messy client applications or command windows open.
  6. Setup a SSH Tunnel from your PC to your Mac, so we can link our machines securely. Using SSHTunnelClient makes this a dream. Click Tunnel, Add, and create a tunnel with the following settings
    • Tunnel Name - iTunes [or whatever you want to call it]
    • SSH Host - xxx.xxx.xxx.xxx [put the IP address of your home Mac here]
    • SSH Port - 22 [i.e. the official SSH port]
    • Local Port3689 [i.e. the iTunes streaming port that iTunes is going to look for locally]
    • Remote Host - 127.0.0.1 [i.e. the tunnel ends locally (127.0.0.1 being localhost) on the remote machine, not bounced onto some further machine]
    • Remote Port - 3689 [i.e. the iTunes streaming port that we are going to connect to on the remote machine]
    • Username - <username> [put your Mac login name here]
    • Save Password - Tick/Untick [Ticking this and putting your password in below means you don’t have to login everytime, but also means anyone who has access to your PC can access your Mac]
    • SSH Key File - Leave blank [You can create key files that do the login and authentication using secure keys without you having to enter a password. I might figure out how to do this sometime but your password is pretty secure in the SSH pipe]
    • Forward - Local to Remote [i.e. poking on the local port forwards us to the remote port]
    • Auto connect - Off [Although if you want it to connect automatically on load set this on]
    • Compression - On [You could turn this off if you want, it wont make any difference to the music I would surmise, but might make the control commands quicker]
    • Do Keep-Alive-Ping - Off [I have this off, if your connection keeps dropping try turn this on]
    • SSH1/SSH2 - SSH2
    That’s it, test the connection and then hit save. Double click the iTunes icon in the SSHTunnelClient box and a little padlock should appear to show we have a connection.

    Drop to dos (Windows Start, Run, cmd) and type "telnet 127.0.0.1 3689". This creates a telnet session to the local machine on port 3689. If our tunnel worked we should be shunted through the virtual pipe to the remote mac, and the screen should go black. Hit enter twice and you should see

    HTTP/1.1 400 Bad Request
    Date: Sat, 12 Mar 2005 21:08:37 GMT
    DAAP-Server: iTunes/4.7.1 (Mac OS X)
    Content-Type: application/x-dmap-tagged
    Content-Length: 0

    This is good, and means we're hitting the iTunes streaming server on the Mac. If you don't get this you have a problem, and you better figure it out, cause there is no point proceeding otherwise.


  7. Download and install Rendezvous Proxy, so that our local iTunes thinks the remote iTunes is local. This is a little Java application that proxies Apples Rendezvous network technology. Without this our local iTunes would have no idea that the remote iTunes exist.

  8. Setup an iTunes daap listener, so that iTunes can see the remote steaming iTunes. Run RendezvousProxy. Click "Add Host", and add one with the following details
    • IP Address - 127.0.0.1 [i.e. look locally (and that’s where it will find the tunnel we set up)]

    • Port - 3689 [i.e. look locally on that port and magically be transported through the tunnel as we proved with our telnet test above]

    • Host Label - iTunes Streaming via SSH Tunnel [or whatever you want to appear in iTunes]

    • Service Text - Leave blank [or whatever 'notes' you want to make]

    • Service Type - _daap._tcp. (iTunes Host) [i.e. The Rendezvous service we are proxying.]

  9. Open up the PC firewall on port 3689, so that we don’t block the incoming stream. If you're running a firewall locally (and if you have XP SP2 you probably are), turn it off. Get the streaming working and then turn it back on. The streaming should fail. Then open up port 3689. If you still have problems try opening up port 5353 (UDP) as well, although I think this is only needed when sharing music from a windows machine.

  10. Open iTunes, listen to music over the internet, so that we can access all our music at home. In iTunes you should see a blue playlist under the green ones for music store and purchased music. Click on it and the system will churn for a while depending on how big your remote playlist is. I'm not sure how much of the full playlist it needs to bring across, but it's a big enough chunk. My playlist is 6.5mb and this takes a minute or two for me, so give it time. If you want to check that it's doing something open up task manger, and click on the networking tab. You should see a whole stack load of activity. After a while the name in the blue playlist should change to the name you set in iTunes in step 1 and a grey arrow should appear next to the name. Clicking the arrow should show you all your playlists, and clicking on a song or a playlist and hitting play should give you music


Other notes

  • Turn of sharing on local machine if you are having problems. I read that this can be an issue on windows. I've also read there are ways to give everyone on your local lan access to the stream via your iTunes, but your on your own figuring that one out.
    • UPDATE - Rendezvous Proxy does this and actually broadcasts the beacon locally, so that others (on your local lan) can see it. Although it wont work with the beacon created above as that points locally (127.0.0.1) and other peoples machines wont have the SSH pipe. I think you need to create another one with your local IP address for this to work. I think. I'm not sure how well this works (so far tests have failed) and remember you only have so much bandwidth

  • If iTunes keeps lossing the connection, directly after retrieving the full list from your remote machine, reboot. Don't know what the problem was, but it worked for me.

  • Remember that you are streaming music. So if you have a 256kb uplink on your DSL and you try streaming a file ripped at 320kb you're going to have a problem. You can try setting your buffer size to be larger, but I don't know what the buffer size is actually so I don't know how much of an effect this will have. I would set the buffer size to be larger anyway (iTunes, Preferences, Advanced, "Streaming Buffer Sized".
    • UPDATE - I have a 256kb connection and anything above 128 needs to constantly rebuffer. I'll be getting a 400kb uplink on thursday so hopefully that will stream better.

  • You can do the same thing running your remote server on unix or windows. On unix you need to set up Multi-Threaded DAAP Daemon and on windows you need to have a SSH server running. Poke around on google for one.


I suspect none of my regular readers will care much about this, but it took me ages to figure out how to do it. So maybe this will help someone else out who arrives via google. Let me know if you find any better way to do this or if it helped. I'm sure there are mistakes in my guide, let me know if you see them

New Notes

  • 09/09 - Apparently there are problems with iTunes 5.0 and sharing. This is because a change to the daap stuff so that Rendezvous Proxy doesn't work with iTunes 5 client. If you want to do this you need to make sure you don't upgrade your client. You can upgrade your server fine. I'm running 5.0 as my server on the mac and 4.9 as my client on windows and that tested fine. If anyone has the solution to using 5.0 as a client, let me know.

  • 30/11 - The same holds true for iTunes 6.0. If you want this to work you need to use iTunes 4.9 as the client. I still can't find a solution, although I believe the MT-DAAPD people have a fix, but Rendezvous Proxy hasn't been updated in like forever. As soon as I have time to poke around and find a solution, I'll let you know.


<% /**/ %>

4 TrackBacks

30 Mar, '05 3:19 PM

Lifehacker

Stream your iTunes library over the internet


Engineer Adrian Sevitz posts instructions on how to play music anywhere from your Windows or Mac iTunes library over the 'net. Super-geek warning: Adrian's method is not for the faint of networking heart. He uses SSH tunneling and a proxy... Read More
31 Mar, '05 6:26 AM

James Seng's Blog

iTunes streaming over Internet


Remember my personal iTunes server I setup last year? I upgraded it a couple days ago to daapd-0.2.4 which support playlist. And I also added Read More
16 Sep, '05 10:00 PM

Lifehacker

How to stream iTunes from home to work


Sevits.com has a detailed tutorial that will teach you how to stream your music, via iTunes and the Internet, from your home computer to your work machine. After much frustration, I've finally set up my new mac mini to stream... Read More
23 Jul, '07 7:12 PM

Liam M

EtherPEG & Accessing your iTunes Share from a remote location


The first thing I have to show you today ia a piece of software for all you Apple Hackers out there it’s called EtherPEG and what it does is in similar fashon to a packet sniffer it watches any traffic that passes by the computer running it and displays any unencrypted images (jpeg/gif) that it sees. This is especially useful and effective on wireless networks. Read More

144 Comments

13 Mar, '05 4:25 PM

1. Matthew

Is it worth it though? I mean really? Would it not be easier to just bring your iPod to work? I’m sure it was fun figuring it all oout though, in a supergeek type way.

13 Mar, '05 4:30 PM

2. Adrian

I didn’t do it so I could figure out how to do it, I did it so I could access my music which was most of the reason for getting the mac.

I do bring my iPod into work, but my iPod holds 4gb and I have 30gb of music.

13 Mar, '05 6:47 PM

3. razorhead

are you using it as a media centre/server?

13 Mar, '05 11:34 PM

4. Adrian

Well I’m definitely using it as a music server, to host all my music which I can sync with my iPod, play anyway (as above) and play at home via an optical/USB adaptor that plugs into my amp. I don’t use it for movies having a quality DVD player and sky plus, meaning I don’t need it for movies.

I’ve also set it up with SFTP and SSH access (and VNC tunnelled through the SSH) so I can access my home storage drive from anywhere. If I’m ever on a client again who blocks things (like the interwebnet), I’ll just tunnel to the home machine.

Next on the list is playing with iMovie, and sorting out some cool movie edits from the ski trip.

16 Mar, '05 6:23 AM

5. Ken

Thank you SIR!! I’ve got around 49GB of mp3’s (and m4p’s from ITMS), and it’s a royal pain to keep multiple (home & work) machines in-sync. Since we can to SSH tunnels out from work (yeah, I’m lucky that way ), simply streaming from home will be SO much easier… Thanks again!

19 Mar, '05 3:38 AM

6. Tim

Anyone ever seen instructions on how to do this XP-to-XP? Sadly, I don’t have a Mac.

19 Mar, '05 6:12 AM

7. Adrian

Tim in my very last bullet point I explain how it can be done. And I allude to it through the post. Get SSH running on your XP server and you’re good to go.

31 Mar, '05 5:19 AM

8. Andrew Escobar

“I suspect none of my regular readers will care much about this, but it took me ages to figure out how to do it.”

That may be true, but your effforts in documenting this were well worth it. It works great!

With NoTTL you can remove all the SSH parts.

  1. Install APE and NoTTL on your Mac.
  2. Configure port 3689 to be forwarded like above.
  3. Run Rendezvous Proxy or Network Beacon as described above, except use your router’s IP instead of the 127.0.0.1 address.
  4. Listen to your music.

Pluses: Easier setup and less bandwidth and cpu power used as it isn’t tunneled. Negatives: Unless you password protect your iTunes share, it’s open to the public.

02 Apr, '05 10:29 AM

10. Adrian

I’m not so sure that’s easier setup. Just different set up.

And I’m not sure I agree that tunnelling massively hits the CPU or bandwidth. I haven’t seen it affect much.

Nor am I sure that messing with the TTL of packets is a good idea but I don’t know enough about your code to really say.

It’s a different option, sure, but since I tunnel for other things now anyway, the tunnelling works well for me.

04 Apr, '05 5:54 PM

11. Jeremy

this is awesome! Now I can listen to my music at school when I’m sitting in class ignoring my teachers :)

08 Apr, '05 4:23 PM

12. Simon

This is the most useful tech faq I have read in ages. I now stream my 15GB home library to my work computer like a dream. W00t!

13 Apr, '05 6:56 AM

13. Logan

Hey I have a Windows and I want to do this, and i know youve already said how to do it for windows but i dont understand so could you in more detail explain how to do it

thanks

13 Apr, '05 12:28 PM

14. Adrian

Logan, What exactly do you not understand?

13 Apr, '05 7:14 PM

15. Logan

I dont know if im supposed to turn on remote login.. I dont know how to connect to my router to forward/open the port If i understood that, SSHTunnelClient would probably work I got a SSH Server called OpenSSH I didnt get anywhere after that

13 Apr, '05 8:39 PM

16. Adrian

Remote login turns on SSH on the MAC. By running OpenSSH you should achieve the same thing for windows, as long as you have no firewalls blocking that port (22)

I can’t tell you much more about your router than I have already said. You need to find your routers manual and work out the nat settings. Basically your outside IP address must point towards the computer your running the SSH server on.

24 Apr, '05 6:05 PM

17. Dimitry

I’ve been trying to get this to work on WinXP for 2 days now. I simply can’t get OpenSSH to work (can’t get the service started).

I’ll keep trying though. Thanks for the tutorial. Dimitry

29 Apr, '05 2:34 PM

18. Kjartan

eh.. Adrian: On my router at home, port 80 and port 22 i redirected to my local ip. On my work nothing is redirected anywhere, and the firewall i’m behind is quite nazi ish! At the moment i’m running SSH through port 80 (because of the firewall at work) Is port 22 or 80, the only ports im suppose to NAT?

29 Apr, '05 2:44 PM

19. Adrian

You probaly find they have opened up port 443 as well, which is the standard SSL port. I would use this over port 80 if you can. Otherwise try find a random port they have left open (I’m sure there must be one) if port 22 is shut. Failing all that use port 80.

Now here is the trick, if you are not using port 22 to go out on, you either need to set up your SSH server to listen on that other port, or you need to use port forwarding to do this.

For example if you are going out on port 443, set up your router to take port 443 on it’s public ip address and forward this to port 22 on your home computer.

So PUBLICIP:443 ⇒ PRIVATEIP:22

If you can’t use any port but port 80 use port 80. Otherwise try port 443. Then try find a port inbetween that is open. Use Shields UP to help you identify open ports.

04 May, '05 3:32 PM

20. Laurence

Thanks a lot. this is very cool. my basic broadband (512 down 128 up) seems to hold up okay. For the tunnel I just used ssh -L 3689:127.0.0.1:3689

13 May, '05 1:58 AM

21. God

This was a complete waste of time. I can’t believe I bothered to try this, because it worked less Union workers. It was useless, and I can’t really see much of a use for that SSHTunnelClient because it’s in German, which and I cannot read, nor does it serve any purpose for making the program work. Still the same problem.

13 May, '05 7:21 AM

22. Adrian

I was quite tempted to delete that comment but I’ll leave it in because it amuses me.

Basically you are blaming your incompetence or inability to solve the problem on me, the program. Nice one. Perhaps you are the problem, not the directions or a program in German, which only has the odd word in German. Ja is yes and nee is no if you can’t figure it.

Anyway, it works, but clearly you don’t.

27 May, '05 5:25 PM

23. fatman

Thanks very much for putting this tutorial together. I’m using a linux server running a daap server ( Found Here ) and have used your tutorial to gain access from work ! A+

I’d never figured out this stuff on my own.

09 Jun, '05 10:33 PM

24. notyou

Okay, I got this working for an OSX server with two different Windows clients, it works like a charm!

However, I’m having a helluva time getting it to work with the same OSX server and an OSX client. It starts up and appears to work, and I can even listen to music. But about 60 seconds-ish after I’ve got things working on the client iTunes, the remote server suddenly disappears from the source list completely. It doesn’t matter whether the client is idling or actively playing a song… the server still just goes away without warning or error message.

I’ve run the ssh tunnel command-line style:

ssh itunes@xxx.xxx.xxx -p 1234 -L 3689:127.0.0.1:3689 -N -f

[note: my server is behind a firewall so I put its ssh service on a higher port (1234) to get around it]

And I downloaded and ran the latest Java version of RendezvousProxy (skipped the OSX-specific install version, since it seemed to be dated).

Anybody have any suggestions? I’ve also tried putting the ssh tunnel on a different local port (3690, changed in both programs of course), just in case my local iTunes is getting in the way (even though I have “share my music” turned off). Still exact same effect.

This is so frustrating, cause it’s working great but then it’s not!! Please help… somebody?! :)

09 Jun, '05 11:48 PM

25. notyou

[Revisal of my previous comment]

I’ve fixed the problem, though I’m not really sure what the underlying cause was. I found two different solutions.

1: As previously, use the Java version of RendezvousProxy. However, keep the BROWSE tab open at all times. For whatever reason, this seems to preserve the existence of the proxy service as far as iTunes is concerned. If I were motivated enough, I’d investigate the source code myself, but my guess is that the browse tab periodically polls the network to find new services or something, thereby keeping the proxy alive. 2: The simpler solution by far… just install the MacOSX-specific version of RendezvousProxy. This version works better anyway, as it will collapse out of the way into a menubar widget that’s otherwise invisible and in the background.

If possible, a note might be useful on this issue — any OSX users would do well to go with the OSX version right off the bat. Seems obvious I suppose, but being a self-motivated hacker I had a “I don’t need to stinkin’ fancy installer” attitude :). I didn’t realize the OSX-specific one was much more than just a repackaged version of the JAR file.

07 Jul, '05 6:27 PM

26. AllThumbs

The tip is great - I understand how all the pieces are supposed to work together, but I am having an issue. I have everything setup/installed and I start the local copy of iTunes, the shared folder from my remote server never appears.

I am running the iTunes4.9 on my home Mac under Tiger 10.4.1. I am trying to connect to it from my work laptop running Win2k, iTunes 4.9. I am using cygwin SSH just because I like the command line for some things.

ssh -L 3689:127.0.0.1:3689 @

I checked the ssh tunnel using Telnet (as per the hint) - everything looks fine. I checked my Rendezvous Proxy settings: 127.0.0.1, 3689, daap.tcp is all correct. The iTunes server is working - I have sharing running on the two computers connected on my home router. I double-checked the firewall settings and ports 22 and 3689 are open on the home server.

Any suggestions on how to test or tips to fix this issue? I think my setup is close, but I can’t tell what I might have done wrong… Thanks!

07 Jul, '05 7:34 PM

27. Adrian

AllThumbs, Delete the Rendezvous Proxy setting and recreate it. Sometimes it looses sight of itself.

08 Jul, '05 8:52 PM

28. AllThumbs

Actually, it turned out to be a VPN service on my work laptop causing the confusion. When I enforce startup of the Proxy service BEFORE the VPN services start everything works fine. If Proxy starts AFTER the VPN services start, then it blocks the connection via port 3689. I think I am good now. Thanks for the help!!

14 Jul, '05 11:07 PM

29. Labelslave

Hey this is a very useful guide, but how would i do a Mac to Mac over the internet connection. Any info would be helpful. thanks!!

15 Jul, '05 7:39 AM

30. Adrian

If you click the links on the words “is plenty of help” in the first sentence, those sites all talk about mac to mac connectivity.

25 Jul, '05 4:26 PM

31. tpat

Anyone else have this stop working after upgrading to iTunes 4.9?

25 Jul, '05 6:07 PM

32. Adrian

Yes, I just upgraded my client to 4.9 and it connects and seems to work but drops the connection fairly quickly after that.

The problem is only on the client side. My iTunes at home (server) was running 4.9 no problem. I don’t know what they have put in to do this though, if you find out let me know.

26 Jul, '05 5:52 PM

33. tpat

I’m using iTunes under OS X for my client. I figured out my issue though. I updated iTunes (server side) to 4.9 through Software Update remotely using ssh. I started having problems (couldn’t connect at all) after killing iTunes and opening it back up. Turned out the damn license agreement was burning me. I had to wait until I could physically access the machine to click Agree.

However, I am going to install iTunes on my Windows box. I’ll let you know if I run into any problems with that.

26 Jul, '05 11:04 PM

34. swatch

Thank you! This is exactly what I wanted to do. You are the master. Not only can I listen to my huge library from work now, but I also learned about SSH, which pertains to my job! I owe you a beer!

27 Jul, '05 4:51 AM

35. Rich

I tried these instructions but kept getting connection errors. E.g., I tried the telnet test above and was getting connection refused, meaning iTunes was not listening on port 3689.
I found that itunes on my remote OS X 10.4.2 box was listening on port 49152. How did I know this?
I typed the following in my shell on that box:

lsof | grep iTunes

I looked for a line like this: iTunes 9540 rcook 16u IPv4 0x0352750c 0t0 TCP *:49152 (LISTEN)

When I changed my tunnel line to: ssh -L 3690:192.168.1.2:49152 richcook.net It worked like a charm. Thanks!

27 Jul, '05 7:38 AM

36. Adrian

Swatch, Rich, glad you got it working. What version of iTunes are you using (on both sides?)

Is it possible to do the same thing but for a Linux computer?

Great article mate!

I did the setup with between my 2 Windows machines and it worked perfectly.

Used http://www.delight.ch/ as SSH server

20 Aug, '05 1:13 AM

40. Eric

I am using windows XP sp2, iTune 4.9 and RendezoursProxy on both side, it works fine only if I turn the server side windows firewall off.

I already opened 3689 TCP, 5353 UDP, VPN ports in my server side windows firewall but cannot stream if the firewall is turned on (not even getting the playlist). I also tried some other ports suggested in the perious comments but still no luck.

Any other ports I need to open as well? Any suggestion? Thank you.

22 Aug, '05 5:14 AM

41. Adrian

Do you have port 22 open? You need port 22 open for the streaming.

Otherwise try looking at the firewall logs and see what it’s blocking traffic on.

29 Aug, '05 8:47 PM

42. David

Just thought I’d post my success using a very cool tool called SSL-Explorer. It’s a secure proxy that you run on a server at home instead of the SSHTunnelClient. It’s a more general purpose proxy that runs on https, allowing you to set up any kind of access you want to your servers at home behind your firewall. The advantage to using SSL-Explorer is that you connect to it and interact with it entirely through port 443. You don’t need to set up any other port forwards on your firewall.

Anyway, I followed the procedure above and in less than 15 minutes I was jammin’ to my iTunes from home… all safe and secure running across a fully encrypted, password protected connection.

Luckily all links between my Windows computer at work and my remote iTunes machine are broadband or better. If you have several servers at home that you want to access remotely, SSL-Explorer can’t be beat.

SSL-Explorer can be found at: http://3sp.com/showSslExplorer.do

Note, I am in no way associated with SSL-Explorer or 3SP. It’s just a way cool tool that I think deserves attention for it’s tremendous usefulness, features and quality.

Cheers —David

29 Aug, '05 8:50 PM

43. David

Geez… I can’t believe I forgot to thank Adrian and all the other people above who had positive contributions on this procedure. It works great!

—David

01 Sep, '05 6:23 PM

44. Jerry

What about those that can’t open port 3689 on the local firewall? I am trying to get my music library to stream from home, but I can’t open the company firewall on port 3689.

01 Sep, '05 6:32 PM

45. Adrian

You should probably be ok as you are tunneling through the company firewall on port 22.

12 Sep, '05 10:37 AM

46. James

Thanks for this excellent how-to.

I seem to have fallen at the final hurdle however - and would be grateful if you would have any tips on where I have failed.

Server Win2K with iTunes 5.0 using CYGWIN sshd. Client WinXP with iTunes 4.9 using putty and rendezvous proxy for ports 127.0.0.1:5353 and 3689

Can TightVNC ok without problems to server from client through SSH tunnel no problems.

Can get the stream message above by telneting on client to 127.0.0.1 on port 3689 but not via port 5353.

iTunes 4.9 on client shows the RV service correctly as a shared library to listen to. But clicking on it results in error message:

“The shared music library iTunes via SSH Tunnel (win) is not accessible for an unknown reason. (-39)

Check any firewall running on either the shared computer or this computer has been set to allow communication on port 5353.”

If the tunnel isn’t open I get the same error message but the code is different (-3260).

Firewall on client is Norton/Symantec and I have been able to view other users iTunes on corporate Lan.

Firewall on server is ZoneAlarm. Given that a different error code is thrown by iTunes when the SSH tunnel is closed, is this the likely culprit?

Many thanks again,

James

12 Sep, '05 10:45 AM

47. James

Oops - just found my mistake:

Needed to tell putty to set up tunnel on local port of 5353 to remote port of 3689, rather than 5353 - > 5353 and 3689 -> 3689.

Now works a beaut - thanks Adrian.

15 Sep, '05 8:45 PM

48. japanese

Dou you know RNSplicer ? RNSplicer is a tool that enables remote access to Bonjour services such as iPhoto libraries and iTunes music. http://www.jaist.ac.jp/~t-mizuka/rns/index-e.html

15 Sep, '05 10:47 PM

49. Gerry Power

mt-daapd rocks!! And beats daapd hands down!!

15 Sep, '05 10:58 PM

50. Adrian

Unless you are running windows, or os x, in which case it’s lagely academic since mt-daapd is Linix only.

16 Sep, '05 1:02 AM

51. Hagrid

Thanks for this excellent how-to.

Doing it step by step goes very well. Thanks again!

16 Sep, '05 4:20 PM

52. Mystech

Ugh, what a hassle. For Windows to Windows music streaming in a secured group (invite only) as well as file sharing, video and more, give Grouper a try. http://www.grouper.com . No, I don’t work for them. I’m just a deliriously happy user that uses their product for FREE access to my remote files and to stream music to various locations and among friends. Regrettably, it’s built on the .NET platform and I don’t know of any Mac access.

16 Sep, '05 6:25 PM

53. Brian

Hello, I just had a headache troubleshooting a problem so I thought I’d share my results. If you can connect to the remote Mac but your connection keeps dropping after a few seconds – it is likely because of a Message Authentication Code error.

My computer with the songs was behind a Linksys router and set up as the DMZ host. This was corrupting the data occasionally and causing the problem. The workaround for this is to explicitly forward the ports needed and then disable the DMZ host feature on the router.

Hopefully this will save someone some time.

17 Sep, '05 12:54 AM

54. Vinu

I just came across this blog and you say that you have a problem with itunes 5 and itunes 4.9!! :-(

could you email me - once you get it working? may be itunes5 on both end will make it work.

I was wondering if we have a VNC from my pc to mac - can’t I just use my songs as file. i.e fool itunes to think my music is locally present.

Thanks, =Vinu

17 Sep, '05 12:56 AM

55. Pasquale

Are any of you guys familiar with OurTunes? If you ran OurTunes while this tunnel was active could you download music directly from the remote machine?

17 Sep, '05 6:01 AM

56. Gene

Wow… this is really complicated and involved. Now, my technique may be antiquated and perhaps not secure, I don’t know. But I just do it using the built-in Mac system. 1) Turn on file-sharing on your source Mac. 2) Mount the file-shared drive on the Mac you want to listen to music on. 3) Drag the iTunes folder from the shared Mac into iTunes on the second Mac. That’s it. From then on, when you play a song that’s on the remote Mac, the system will mount the remove volume and access the song.

17 Sep, '05 12:32 PM

57. Adrian

You can always mount the remote volume, but it’s going to use more bandwidth as you have no server streaming the tracks wich is less bandwidth intensive.

Also you then don’t have access to the meta information, such as playlists and ratings and stuff.

21 Sep, '05 1:24 PM

58. Thomas B

In the old days before Windows XP SP2 you could just use Rendezvous proxy to do the job, without any complicated ssh tunneling, does anyone no why this can no longer be done?, why isn’t rendezvous proxy even being develupped anymore? On a second remark is there a windows tool available that can remove TTL from a packet? such as noTTL does for mac.

21 Sep, '05 4:46 PM

59. S. C.

Getting a “host does not exist” error when I test connection or attempt to connect via the SSH tunnel Client. I am 100% sure that I have the correct IP, and have the correct ports open on both my router router and firewall. Any ideas? Rendevous Proxy is working, and I’m getting the “correct” error from the command line. I’m still using iTunes 4.9 on both machines, so that isn’t it, either. Any ideas?

21 Sep, '05 9:43 PM

60. Adrian

Thomas, I think the tunneling is needed for the server not the client. Since iTunes 4.1 you need to appear local not remote, which is why you need the tunnel.

I don’t know why rendezvous proxy is no longer being developed. Contact the developers and let me know. :-)

S.C., not sure. Something isn’t set up right somewhere. Just can’t tell what. Sorry, I kinda need to see a machine to debug. :-(

23 Sep, '05 5:02 PM

61. Devin Lane

I have iTunes 5.0.1 running on my OS X box as the server, and iTunes 5.0.1 on my Windows box as the client. Works fine for me. No need to downgrade the client to 4.9.

Thanks for the great tutorial, works great on my college campus!

26 Sep, '05 8:07 PM

62. Tom M

For an alternative to this method check out the”>the”>the">http://edna.sourceforge.net/”>the small Edna mp3 streaming script.

It is pretty simple and interacts directly with your files instead of going through iTunes.

29 Sep, '05 11:09 PM

63. Rob

“Needed to tell putty to set up tunnel on local port of 5353 to remote port of 3689, rather than 5353 - > 5353 and 3689 -> 3689”

I was wondering how you do that within putty. Is it type in the ip address then next to that where it says port you type 5353?

30 Sep, '05 8:39 AM

64. Adrian

I think it’s something like

putty -L 5353:homeserver-ip-address:3689 -l username -N homeserver-ip-address

But it’s definitely easier if you use SSHTunnelManager. Make your life much easier.

10 Oct, '05 2:51 PM

65. Mr Anderson

Not sure if this is still relevent, but I don’t seem to have the problem in the Note added 09/09 regarding v.5.0 clients not working with RdvProxy.

I have both my home machine (Windows server iTunes) and my work machine (Windows clinent iTunes) running via an SSH Tunnel. The only two ports tunneled for this were as before when I used the previous versions of iTunes (3689 3689 and 5353 5353 for windows versions of iTunes as recommended here or elsewhere).

One thing I did try and set up when it did stop working was add another tunnel for NFS as I was going to announce the iTunes music folder as an NFS volume and mount it locally and therefore access the files directly - anyway, I didn’t get round to finding a nice integrated NFS client.

So, one thing I did notice from the posts above was the cross connecting of the 5353 3689. I’ve not done this and it still works.

Cheers Mr Anderson

10 Oct, '05 3:01 PM

66. Adrian

Thanks Mr Anderson (I feel like I’m in the matrix). I’ll try using/testing v5 when I get a chance.

I didn’t think the cross connecting of ports was needed, but since I’m on the mac I didn’t need 5353 anyway.

10 Oct, '05 5:36 PM

67. Mr Anderson

Hi Adrian,

So, previous to writing the above short note, I had typed up a longer note detailing my endeavours. Well, the copy/paste buffers now been lost!

here’s a shorter note. I tried another of the above comments about deselecting the Radio checkbox in the General tab of Preferences. This I forgot to mention as I’ve a feeling iTunes worked straight after when I re-initiated the connection (VPN from a laptop at home to work, then SSH from my work PC back to my iTunes server - VPN’ing from the same box as the SSH server just confuses the router and the SSH connection back didn’t work!)

I then re-enable the Radio checkbox.

To add to this I also noticed that all the playlists checked for sharing weren’t checked - that may have been a result of the upgrade to v5.0!

Cheers

26 Oct, '05 10:09 PM

68. LedZeppelin

i cant find my ip address on my hp with windows help please!

26 Oct, '05 10:13 PM

69. Adrian

Sigh. If you cant find your IP address, you may find the rest of this a bit of a challenge. Your external IP address can be found in step 4 above.

Your internal IP address, you can find from dropping to the command line and typing ipconfig in windows or ifconfig on OSX.

02 Nov, '05 6:24 AM

70. collideous

I read your guide but took a different approach to access my music at home from my office PC. I use iTunes for listening on both machines. The sharing part however is done by my Apache server. I’ve written two PHP scripts. The first one reads the iTunes library (iTunes Music Library.xml) on my home PC, replaces every “file://localhost/” with the URL of the second script, and returns the new XML library file. I save this library file on my office PC and import it to iTunes. The second PHP script streams the music. It uses Lame to downsample the songs to any desired bitrate. The nice thing about this approach is that I don’t need any software other than iTunes on my office machine, and the music stream runs across regular port 80.

02 Nov, '05 10:03 AM

71. tianhaw

how do you set the music sharing for windows?

02 Nov, '05 10:11 AM

72. Adrian

I’m not quite sure I actually understand your question, especially given the answers are in the post.

02 Nov, '05 11:19 PM

73. Dan

How would I reverse the process and allow myself to broadcast my music from my PC to mac? Im actually confused on how to do steps 2 - 6 for this process.

03 Nov, '05 8:04 AM

74. Adrian

Well you need to run some sort of SSH server on your PC, and on your mac you need SSHTunnel Manager and Rendevouz Beacon. Otherwise it’s pretty much the same. Although rather more complicated. Good luck.

07 Nov, '05 9:15 AM

75. JRock

First off thanx so much for this guide. It has been a huge help in gettin me started on this project. I am not too network savy so I have to ask. Ill reread all of the posts and hopefully with some help get on my way to listening to my music from home at work. First off I am serving from WinServer 03 and ill be listening from an XP machine. I notice u make mention of not using iTunes 5, is this for the server or the computer im listening from? Is there a fix to use 5? Last one. From what I have read I need to open ports 22(ssh) 3689(itunes) and 5353(windows) all forwarded to my WinServer?

07 Nov, '05 10:26 AM

76. Adrian

I haven’t tested under iTunes 5 or 6, so I can’t comment on if it works. iTunes 4.9 does work and they only thing I use iTunes for on my PC is to connect to my mac at home, so I’m not bothering upgrading it.

Yep, those ports are all correct.

11 Nov, '05 5:40 PM

77. entplex

i am cuurently using itunes 5.0.1 on my host machine as well as my client, the host is a windows and the client a mac. the technique is use is slightly different then that outlined above. rather then directly using ssh to access my host computer, i route my tunnel through my server at home (a linux box) and then thurther forward the port to the ip of my host computer. when i ssh into my server i simply use the -L port:ip:port command. this routes the port from my server to my host computer’s ip on my local network at home.

14 Nov, '05 8:52 AM

78. macfan

A much easier way to make this work is to use the free (GPL) zerospan which is a GUI that lets you wire up the rendezvous of any two macs over the net. No SSH, proxy, redirector or beacon required. get it at www.zerospan.org if you want to give it a try.

14 Nov, '05 9:01 AM

79. Adrian

Only useful however if you have two mac’s, which you may have noticed I don’t.

28 Nov, '05 7:33 PM

80. JiveAssMoFo

Well done, thanks much for the excellent tutorial! Now I don’t have to schlep my iPod to work. Must look into other tricks that can be done over SSH tunnels. Cheers.

30 Nov, '05 9:31 PM

81. quiz

I am trying to connect from my mac to my home pc and have gotten incredibly close but I keep getting error messages when I click on my new shared computer in itunes (it thinks for a while, then gives up).

What I’ve done is set up an ssh server on my pc, cygwin, forwarded all the ports, and turned off windows firewall.

I then tunnel from my mac to my pc with terminal, (I’ve tried different variations of the 3689 and 5353 ports), and run network beacon on my mac to proxy the .daap on port 3689. Is there something simple I am missing? It seems like I’ve covered all the same bases as in your walk through.

30 Nov, '05 10:01 PM

82. Adrian

Hmm. I don’t know about going Mac -> PC. It may be that the PC needs something on port 5353 that the Mac isn’t sending?

Also if you are using versions of iTunes 5+ that may be the problem. I haven’t got it working with anything after 4.9

Try also looking at the links in the first paragraph where I say “plenty of help”, there might be some additional help there. If you solve the problem, please leave a comment saying how you did it.

30 Nov, '05 11:02 PM

83. quiz

OK - Its working but I have to say I am unsure exactly how that happened. My initial guess is that some network settings had to time out or something like that. Also all connections are with the latest itunes releases which I guess is something new.

To recap what I did: set up ssh server on my windows pc with cygwin. Turned off windows firewall (probably only necessary to unblock port 3689 but I was getting annoyed with it). Forwarded ports 22 and 3689 on my router to my home pc.

From my mac I tunneled with ssh using terminal and the following command: sudo ssh -l “name” -L 3689:127.0.0.1:3689 mypc.wherever.net

where “name” is your login name

have to use sudo for root access

then ran network beacon for port 3689 and service type as daap.tcp.

I am unsure which order ended up working, but I think I enabled ssh first, then turned on network beacon.

I have sharing enabled on both ends in itunes also, which seems to contradict some earlier posts (as well as using 3689 on my pc…)

anyway, good luck to anyone else attempting this - and thanks for your great walk through.

15 Dec, '05 8:09 PM

84. josh rigby

hi, this would be amazing if i can get it working(already shelled out for mp3tunes service when this can do everything i want!!) just wondered as i’m using a laptop does it matter if i’m trying to set this up whilst both systems are working off of the same router? i aplogise if this is a stupid question!

15 Dec, '05 8:13 PM

85. Adrian

It may be a problem as it will pick up the sharing locally. Although you probably could still get the tunnel to work, and probably get the sharing to work in that tunnel.

You would still need to set up the router to route the ports correctly and that you couldn’t test locally.

15 Dec, '05 8:29 PM

86. josh rigby

sorry my ineptness is probably going to annoy you but i’m getting the error message “Fatal error:network error:connection refused” when using SSH tunnel client! any suggestions i’ve set up the router and everything else!

16 Dec, '05 8:56 PM

87. Matt

I had been doing a remote WinXP to WinXP iTunes share using RendezvousProxy and an SSH tunnel at work and OpenSSH server at home…BUT…

After listening to the most recent episode of Leo Laporte and Steve Gibson’s podcast, I decided to see if Hamachi would work…and it DOES. No RendezvousProxy, no SSH tunnels…just Hamachi. It must be installed on both machines and both must join the same virtual network. Very slick program. Only Windows and Linux versions exist at present, but there are supposedly plans for a Mac OS X version soon.

For those who haven’t heard of it yet, Hamachi is a zero-config, ad hoc, virtual private networking tool.

16 Dec, '05 9:04 PM

88. Matt

Forgot a couple of things (one good, one bad):

The good: Hamachi works without having to open any firewall ports or do port forwarding on your home NAT router. I am jamming right now with no open ports 22 or 3689 in sight. :)

The bad: Hamachi doesn’t work with all NAT routers…I think their site says that there are 5-10% that are unsupported for various reasons.

22 Dec, '05 2:42 AM

89. elmore

I actually have an interesting issue. Connecting from an itunes 4.9 (windows)box to an itunes 4.9 (windows)

I have everything setup correctly I pull the shared music list and can stream music. However after playing the first few seconds of any song itunes immediately goes to the next song and begins to play it. It’s random too, 5 seconds of song a 7 seconds of song b 3 seconds of song c.

I have plenty of bandwith so it’s not a streaming issue. Anyone have any ideas for me?

22 Dec, '05 8:45 AM

90. Adrian

Hmm, not sure. have you tried increasing the buffer size on the server?

22 Dec, '05 10:37 PM

91. IBNetman

For those that are interested.. I have been successful in remotely running Itunes version 6 on XP to Itunes 6 on XP over the net. I simply run sshd from cygwin on my main system and run Delights SSH tunnel client with RendezvousProxy. Works Great.

11 Jan, '06 1:48 AM

92. Jeff Beeman

I was able to successfully connect to a Mac running iTunes 6, using iTunes 6 on a Windows XP machine. I’m using SSH Secure Shell to do the tunneling, though. And, Rendevous seems to be working just fine.

Are other users still experiencing problems getting it to work with iTunes 6?

12 Jan, '06 2:59 AM

93. Phil Fote

Using Itunes 6 on PC (client) and mac (server)…can’t get any of the above to work…tried Hamachi, ssh tunnels, rendesvous proxy, etc etc etc…any help?

12 Jan, '06 4:31 PM

94. Adrian

I have been really busy lately and haven’t had a chance to check this out. I’ll try have a look at it again in a few weeks.

27 Jan, '06 5:36 PM

95. Mike D

Phil Fote and Jeff Beeman… PLEASE elaborate on what you did. I read the posts and am quite curious to how you managed to get that.

I get an error “The shared library is not accessable for an unknown reason(-39)” “Check that any firewall software running on the shared machine or this machine has been set to allow communication on port 3689”

I thought the purpose of tunneling was to get through the firewall, I know it was working before . Im not sure which version i was running. Im working on to see where i canget . If i get any info ill post it here

04 Feb, '06 1:43 AM

96. omnix

I have it working for itunes 6.0 (on both server and client). The itunes server is running on my mac mini. I originally had the (-39) error when I used:

plink -L 3689:localhost:3689 (ip of my mac mini)

Then I used plink -L 3689:127.0.0.1:3689 (ip of my mac mini) instead and it worked.

08 Feb, '06 10:41 PM

97. Joe P

I have same problem as elmore (post 12/22/05) with XP to XP / iTunes 4.9: After a few seconds remote song skips to the next.

You recommend increasing buffer size. Which buffer do you refer to?

Thx, JP

09 Feb, '06 2:10 AM

98. chapman

The directions above worked for me without modifications for a iMac running version 6 iTunes, and a Windows XP laptop running iTunes 4.9. No problems with Rendezvous Proxy or SSHTunnelClient.

Thanks for this - a heck of a lot easier than setting up SoftSqueeze/SlimServer.

18 Feb, '06 12:08 AM

99. Filip M

Well dudes and dudettes, i have to say i’ve been looking for a way to stream music over the net for a long time now. I want to be able to share playlists and stream songs for my friends. Using your method would require said friends to download and run the proxy. An easier way I found was a program called, NiceCast by Rogue Amoeba. it is only mac based but im sure someone will run a windows version soon. Check it out, it allows you to stream over the net and create your own radio station!!! (If anyone knows a windows based version definitely let me know.) thanks all.

20 Feb, '06 7:16 PM

100. Jobis

Don’t know if this question is even appropriate for this thread, but I’m wondering if there is a way to share music from multiple machines. i.e., I want to put some songs onto my pod from a friend’s itunes without totally wiping out everything that I have on mine. I don’t even necessarily need stuff that he bought from itunes, just his ripped cd stuff. Is this possible ?

20 Feb, '06 10:17 PM

101. Adrian

Just plug it in, tell it NOT to synch, set it to manual mode and drag and drop. When you get home copy your music off the ipod and into itunes. Sync and way hay.

14 Mar, '06 8:40 PM

102. Jared

Thanks for the info! I just got it working using iTunes 6.0.4.2 client and server, XP to XP. I used cygwin as my ssh server and logged in as others, with the ssh -L 3689:127.0.0.1:3689 myserver

Is there any way to run a Rendezvous proxy from cygwin? In other words, is there a program like Rendezvous proxy compiled for use with cygwin that I could possibly run as a Windows service on boot? Thanks again.