Saturday, May 24, 2008

OpenVPN, Tunnelblick, bridged network (tap device), mDNSResponder, and daapd on OS X - Part 2

  • i found the following sh-script (executed with administrator privileges) does help most of the time (cf. http://iiegn.blogspot.com/2008/03/openvpn-tunnelblick-bridged-network-tap.html for the problem...)

#!/usr/bin/env bash

killall openvpn
sleep 1

launchctl unload /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist

sleep 3
kextunload /Library/Extensions/tun.kext
kextunload /Library/Extensions/tap.kext
sleep 5
kextload /Library/Extensions/tap.kext
kextload /Library/Extensions/tun.kext
sleep 5
kextunload /Library/Extensions/tun.kext
kextunload /Library/Extensions/tap.kext

launchctl load /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist


in order to get this sh-script executed the following lines of AppleScript might be helpful (saved as an Application Bundle with the above script inside the bundle):

set myPath to POSIX path of (path to me as string)

do shell script myPath & "/Contents/Resources/Scripts/upndowntaptun.command" with administrator privileges

display dialog "You may now restart your Tunnelblick Connecrtion." buttons {"OK"} default button 1


references:
  1. http://developer.apple.com/technotes/tn2002/tn2065.html
  2. http://lists.apple.com/archives/Applescript-users/2007/Apr/msg00232.html

No comments: