Mount network share when OpenVPN Connect establishes connection

When OpenVPN Connect establishes a connection, I can manually mount a network share in Finder>Connect to Server>smb:// Yay me.

If I want to be fancy, I can also do this with an AppleScript:

open location "smb://"

Sometimes the VPN loses connection and the client reconnects automatically, but the folder is not remounted. I would like to automatically mount/remount upon OpenVPN Connect connecting to the VPN, and I think this can be done by pointing to a script in the config fie, but we have reached the outer limits of my knowledge and ability to Google.

Is this a thing?

This might help.


1 Like

There’s also

Which I successfully used at uni to connect to network shares.

1 Like

Thanks. I saw that, but oddly enough I was not able to get connected with Tunnelblick when I set things up, so I went with OpenVPN Connect. Resolving that may turn out to be easier.

I’ll check it out.

Not sure if we missed each other in passing, but AutoMounter is probably easier.

I will happily invest 10 bucks if this will solve it. I will report back. Thanks so much!

1 Like

Thanks, @JohnAtl.

I bought Automounter and the “pro upgrade” for a total of $13.99. So far, so good.

When I connect to the VPN, it mounts the share with the correct user and remounts when I disconnect/re-connect.

I was reluctant to post such an edge-question here, but I can’t tell you how much googling and reading I did without uncovering this solution. Thank you!


You’re welcome!