Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Use iTunes 9's Home Sharing over the Internet' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Use iTunes 9's Home Sharing over the Internet
Authored by: dizziness on Oct 07, '09 10:27:04AM

I do something similar as well, using iVPN to control the integrated L2TP server in Mac OSX, the integrated L2TP client and Yazsoft's ShareTool. It not as economical as the OpenVPN/Viscosity option. Plus ShareTool currently only shares Bonjour in one direction, meaning only shared library and not Home Sharing. The developer is working on it.

If someone has a simple OpenVPN server setup, I'd make the switch.



[ Reply to This | # ]
Use iTunes 9's Home Sharing over the Internet
Authored by: antifuchs on Oct 07, '09 01:40:27PM
The server setup is pretty easy; hardest part is generating the certificates (and easy-ca takes good care of that for me). If you're interested, check the configuration file that I use: http://boinkor.net/openvpn/vpn.boinkor.net.conf - you just supply the keys and the server to run the thing on.

Come to think of it, a server machine would be the most expensive thing if you don't have one running already; I think you can set up your iTunes library host computer to be the openvpn tunnel endpoint; this way you'd just have to figure out any port forwarding measures for the openvpn protocol port (I use 443/tcp, as that's the one most firewalls will let through unchallenged) if that computer is in a NAT network setup.

[ Reply to This | # ]
Use iTunes 9's Home Sharing over the Internet
Authored by: quangdiggity on Oct 07, '09 07:44:05PM
Inspired by this hint and antifuchs' comments, I managed to get iTunes Home Sharing working via OpenVPN and tap. My solution was cobbled together from several google search results.

Here is a rough sketch of how I did it.

Mac server

  1. Install OpenVPN using MacPorts.
  2. Setup certificates by following the HOWTO instructions. (This is the hardest step.)
  3. Configure the OpenVPN server (my server.conf is below)
  4. Install the taptun kernel extension
  5. Poke a hole through your firewall/router for the OpenVPN port (default UDP 1194).
  6. Add OpenVPN to LaunchDaemons (code below).
  7. You may need a restart to launch OpenVPN.
  8. Warning: If you install viscosity on the server, it may want to update the taptun kext and disable their autoloading. Don't let it do this. You can get around by copying the relevant kexts from within the Viscosity.app bundle to /Library/Extensions/.
Mac client
  1. Install Viscosity
  2. Add a new connection in Viscosity, being sure to select "tap" for the device.
    • Select "tap" for the device.
    • Leave "Enable DHCP," "Enable DNS support," and "Send all traffic over VPN connection" unchecked.
    • Copy your certificates and key from the server and add them to Viscosity.
server.conf (place in /opt/local/etc/openvpn/ or wherever you decided to place the OpenVPN config files)
# You can use a different port and/or tcp instead of udp if you like
port 1194
proto udp
max-clients 10

dev tap

# Set 10.0.2.0 to something that does not conflict with the subnet your server is on.
# My home mac is on subnet 10.0.1.xxx so I chose 10.0.2.0
server 10.0.2.0 255.255.255.0

ca keys/ca.crt
cert keys/server.crt
key keys/server.key
dh keys/dh1024.pem

keepalive 10 120

comp-lzo

user nobody
group nobody

persist-key
persist-tun
openvpn2.plist (place in /Library/LaunchDaemons/ and set /opt/local/etc/openvpn below to wherever you placed the OpenVPN config files)

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd";>
<plist version="1.0">

<dict>
        <key>Label</key>
        <string>org.openvpn2</string>
        <key>OnDemand</key>
        <false/>
        <key>Program</key>
        <string>/opt/local/sbin/openvpn2</string>

        <key>ProgramArguments</key>
        <array>
                <string>openvpn2</string>
                <string>--config</string>
                <string>server.conf</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
        <key>TimeOut</key>
        <integer>90</integer>
        <key>WorkingDirectory</key>
        <string>/opt/local/etc/openvpn</string>
</dict>


[ Reply to This | # ]
Use iTunes 9's Home Sharing over the Internet
Authored by: quangdiggity on Oct 07, '09 07:58:00PM
Use iTunes 9's Home Sharing over the Internet
Authored by: echamings on Oct 15, '09 05:55:36AM
Trying to follow the instructions here, setting up the keys was a major hassle, so much so I had to ditch that and run with a static key, which seams simpler for a 1-1 VPN solution. It was constantly telling me that I had to define KEY_DIR, no amount of defining the variable in vars or putting in the path would get it any further. No idea what was causing that.

I have a question about getting openvpn to run however. So I am at the stage where I have openvpn installed via macports, a static key, tap/tun installed, and an edited server.conf file. I am attempting to run openvpn2 in this manner: openvpn2 --cd /etc/openvpn --config /etc/openvpn/server.conf and I am presented with this:

Options warning: Bad backslash ('') usage in /etc/openvpn/server.conf:1: remember that backslashes are treated as shell-escapes and if you need to pass backslash characters as part of a Windows filename, you should use double backslashes such as "c:openvpnstatic.key" Use --help for more information.

Now, there are ZERO slashes in my config file here:
port 1194
proto udp
max-clients 10

dev tap

server 192.168.2.0 255.255.255.0

secret key.txt

keepalive 10 120

comp-lzo

user nobody
group nobody

persist-key
persist-tun

I can't get any further. Does anyone have any ideas?

[ Reply to This | # ]