best practices for "no need to connect" detection

12 views
Skip to first unread message

Илья Шипицин

unread,
Feb 20, 2018, 8:47:24 AM2/20/18
to tunnelblick-discuss
hi,

considering tunnelblick as corporate vpn client what are best practices for detecting "I'm already in office, no need to connect via vpn" condition ?
maybe some script ? (which pings corporate LAN address)

cheers,
Ilya Shipitsin

Tunnelblick developer

unread,
Feb 20, 2018, 8:56:35 AM2/20/18
to tunnelblick-discuss
Perhaps some actual users should chime in here, but from my perspective, probably the best way is to have a "pre-connect" script (see Using Scripts) in you .tblk configuration. If it exits with a non-zero status, the connection will be considered to have failed. 

Make sure not to have "Keep Connected" checked on the "Advanced" settings window, otherwise Tunnelblick will see the failure and retry.  (The corresponding preference name is AAA-keepConnected where AAA is the name of the configuration.)

Илья Шипицин

unread,
Feb 20, 2018, 9:16:54 AM2/20/18
to tunnelblick-discuss
well, we definetly can provide "Keep Connected" via *.tblk.zip


is there a way not to fail, but inform a tunnelblick not to connect ?

( we can delist vpn servers from corporate dns, we tried this before, people complain "I was told to connect to vpn, it is failed!", no matter they are already in the office)


вторник, 20 февраля 2018 г., 18:56:35 UTC+5 пользователь Tunnelblick developer написал:

Tunnelblick developer

unread,
Feb 20, 2018, 9:26:47 AM2/20/18
to tunnelblick-discuss
The scripts only a failed/succeeded status, nothing more nuanced, although before failing the script could display a notification that "A VPN connection is not necessary", which might help some users.

Or you could have users connect to the VPN via an AppleScript instead of using Tunnelblick directly. The Applescript would decide whether or not to connect and then either tell the user the VPN is not necessary or tell Tunnelblick to connect (see ApplesScript Support).

Илья Шипицин

unread,
Feb 20, 2018, 9:53:48 AM2/20/18
to tunnelblick-discuss
ok, I'll test those scripts and come back later :)

вторник, 20 февраля 2018 г., 19:26:47 UTC+5 пользователь Tunnelblick developer написал:
Reply all
Reply to author
Forward
0 new messages