This article has primarily been written to allow other users to share their iTunes playlists from outside their local LAN. I write this entry not to cover the initial setting up of OpenVPN, there’s plenty documentation to aid you here, but rather the implementation of a bridged solution for OpenVPN. Whilst a routed approach scales better, Windows users will find themselves unable to resolve NetBIOS names – a critial part of iTunes’ successful operation across a LAN.
We aren’t even able to use a WINS Server to assist us here, as broadcast packets need to traverse across different LAN’s – impossible using a routed OpenVPN. No, we must configure a VPN solution deployed to use a bridged adapter, allowing full NetBIOS name resolution.
- Install the bridge utilities. Without this package, our solution will not work.
- Create a file called
openvpn-bridgewithin/usr/local/bin/. Paste this shell code into the newly created file. Remember, if using VIM to ‘:set paste‘.#!/bin/bash # Define Bridge Interface br="br0" # Define list of TAP interfaces to be bridged, # for example tap="tap0 tap1 tap2". tap="tap0" # Define physical ethernet interface to be bridged # with TAP interface(s) above. eth="eth0" eth_ip=".." eth_netmask=".." eth_broadcast=".." gw=".." case "$1" in start) for t in $tap; do openvpn --mktun --dev $t done brctl addbr $br brctl addif $br $eth for t in $tap; do brctl addif $br $t done for t in $tap; do ifconfig $t 0.0.0.0 promisc up done ifconfig $eth 0.0.0.0 promisc up ifconfig $br $eth_ip netmask $eth_netmask broadcast $eth_broadcast route add default gw $gw ;; stop) ifconfig $br down brctl delbr $br for t in $tap; do openvpn --rmtun --dev $t done ifconfig $eth $eth_ip netmask $eth_netmask broadcast $eth_broadcast route add default gw $gw ;; *) echo "usage openvpn-bridge {start|stop}" exit 1 ;; esac exit 0 # < ---END--->
October 10, 2006



















1 person has left a comment
Hi.
First of all – thanks for this great tutorial.
I have a bridged connection to my openvpn server and everthing works fine, but i can\’t see the mt-daapd library on my macbook pro itunes.
Appletalk works and ping although.
Do you know a solution for this problem? Is it is possible, that apple changed something in the new itunes 7.1.1?
ChrizDee