2010-05-03 16:49:13 *Tunnelblick: OS X 10.4.11; Tunnelblick 3.0 (build 1437); OpenVPN 2.1.1
2010-05-03 16:49:17 *Tunnelblick: Attempting connection with CONNECTION.conf; Set nameserver = 0; not monitoring connection
2010-05-03 16:49:17 *Tunnelblick: /Applications/Tunnelblick.app/Contents/Resources/openvpnstart start CONNECTION.conf 1338 0 0 0 1
2010-05-03 16:49:17 *Tunnelblick: /Applications/Tunnelblick.app/Contents/Resources/openvpn --management-query-passwords --cd /Users/USERNAME/Library/Application Support/Tunnelblick/Configurations --daemon --management-hold --management 127.0.0.1 1338 --config /Users/USERNAME/Library/Application Support/Tunnelblick/Configurations/CONNECTION.conf --script-security 2
2010-05-03 16:49:17 SUCCESS: pid=8943
2010-05-03 16:49:17 SUCCESS: real-time state notification set to ON
2010-05-03 16:49:17 SUCCESS: real-time log notification set to ON
2010-05-03 16:49:17 tls_timeout = 2
2010-05-03 16:49:17 renegotiate_bytes = 0
2010-05-03 16:49:17 renegotiate_packets = 0
2010-05-03 16:49:17 renegotiate_seconds = 3600
2010-05-03 16:49:17 handshake_window = 60
2010-05-03 16:49:17 transition_window = 3600
2010-05-03 16:49:17 single_session = DISABLED
2010-05-03 16:49:17 tls_exit = DISABLED
2010-05-03 16:49:17 tls_auth_file = '/Users/USERNAME/keys/KEYNAME.secret'
...
2010-05-03 16:49:23 /sbin/route add -net 10.109.0.0 10.109.0.1 255.255.0.0
2010-05-03 16:49:23 /sbin/route add -net 10.201.0.0 10.109.0.1 255.255.0.0
2010-05-03 16:49:23 /sbin/route add -net 10.110.0.0 10.109.0.1 255.255.0.0
2010-05-03 16:49:23 /sbin/route add -net 10.113.0.0 10.109.0.1 255.255.0.0
2010-05-03 16:49:23 /sbin/route add -net 192.168.0.0 10.109.0.1 255.255.0.0
2010-05-03 16:49:23 GID set to nobody
2010-05-03 16:49:23 UID set to nobody
2010-05-03 16:49:23 Initialization Sequence Completed
2010-05-03 16:49:23 IP-NUMBER
(the add's above are of private numbers, of course.)
log ends with disconnection, thus:
2010-05-03 16:49:41 event_wait : Interrupted system call (code=4)
2010-05-03 16:49:41 TCP/UDP: Closing socket
2010-05-03 16:49:41 /sbin/route delete -net 192.168.0.0 10.109.0.1 255.255.0.0
2010-05-03 16:49:41 ERROR: OS X route delete command failed: external program exited with error status: 77
2010-05-03 16:49:41 /sbin/route delete -net 10.113.0.0 10.109.0.1 255.255.0.0
2010-05-03 16:49:41 ERROR: OS X route delete command failed: external program exited with error status: 77
2010-05-03 16:49:41 /sbin/route delete -net 10.110.0.0 10.109.0.1 255.255.0.0
2010-05-03 16:49:41 ERROR: OS X route delete command failed: external program exited with error status: 77
2010-05-03 16:49:41 /sbin/route delete -net 10.201.0.0 10.109.0.1 255.255.0.0
2010-05-03 16:49:41 ERROR: OS X route delete command failed: external program exited with error status: 77
2010-05-03 16:49:41 /sbin/route delete -net 10.109.0.0 10.109.0.1 255.255.0.0
2010-05-03 16:49:41 ERROR: OS X route delete command failed: external program exited with error status: 77
2010-05-03 16:49:41 Closing TUN/TAP interface
2010-05-03 16:49:41 /Users/USERNAME/Library/openvpn/CONNECTION.down tun0 1500 1546 10.109.1.96 10.109.0.1 init
2010-05-03 16:49:42 script failed: could not execute external program
The down script /Users/USERNAME/Library/openvpn/CONNECTION.down :
#!/bin/sh -e
trap "" TSTP
trap "" HUP
trap "" INT
export PATH="/bin:/sbin:/usr/sbin:/usr/bin"
PSID=$( (scutil | grep PrimaryService | sed -e 's/.*PrimaryService : //')<< EOF
open
get State:/Network/Global/IPv4
d.show
quit
EOF
)
if [ ! -e /tmp/openvpn_dns_${PSID} ]; then
exit 0
fi
if [ ! -e /tmp/openvpn_domain_${PSID} ]; then
exit 0
fi
scutil << EOF
open
d.init
d.add ServerAddresses * `cat /tmp/openvpn_dns_${PSID}`
d.add DomainName `cat /tmp/openvpn_domain_${PSID}`
set State:/Network/Service/${PSID}/DNS
quit
EOF
rm /tmp/openvpn_dns_${PSID} /tmp/openvpn_domain_${PSID}
exit 0
My workaround is to sudo the above script, which does what I would have expected. It seems as though Tunnelblick is failing to run it as root – but it runs the up script OK, and that needs root privilege also.
The config file:
client
dev tun0
proto udp
remote IP-NUMBER 12109
resolv-retry infinite
nobind
user nobody
group nobody
persist-key
persist-tun
ca /opt/conf/home-vpn/current/etc/ssl/ca.servers.sensors.crt.pem
cert /opt/conf/home-vpn/current/etc/ssl/USER.crt.pem
key /opt/conf/home-vpn/current/etc/ssl/USER.key.pem
;ns-cert-type server
tls-client
tls-auth /Users/ajmalton/keys/cyclops.secret
comp-lzo
tun-mtu 1500
fragment 1300
mssfix 1300
pull
verb 5
;mute 20
up /Users/USERNAME/Library/openvpn/CONNECTION.up
down /Users/USERNAME/Library/openvpn/CONNECTION.down
I didn't write the above conifg, some kind of sysadmin did – I don't understand all of it.
Thanks for all help.
--
Andrew J. Malton
Waterloo, Ontario