Execute bash script before connection?

37 views
Skip to first unread message

lee jonson

unread,
Mar 26, 2023, 3:50:21 AM3/26/23
to tunnelblick-discuss
Hi! I have my own vpn server (openvpn) and when I connect to it from macos sometimes routes get messed up due to network problems so I get this

2023-03-26 10:37:26.147983 MANAGEMENT: >STATE:1679816246,WAIT,,,,,,
2023-03-26 10:37:26.165161 MANAGEMENT: CMD 'hold release'
2023-03-26 10:37:28.651281 write UDP: Can't assign requested address (code=49)

So I created this simple bash script which resolves an issue:

$> less resnet.bash
ifconfig en0 down && route flush && ifconfig en0 up

Is there any way to run it each time before connection?

Thanks.
Message has been deleted

Tunnelblick developer

unread,
Mar 26, 2023, 8:05:07 AM3/26/23
to tunnelblick-discuss
Yes. Use a "pre-connect.sh" script. See Using Scripts.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages