SparkLabs Forum.

Community Help.


VPN & Network Connection on Resume From Sleep

I'm having some issues on my MacBook (macOS latest release version) on resuming from sleep. the problem relates to apps using the network rather than Viscosity/VPN directly.

i.e. 1. Everything working fine, viscocity connected to VPN (over WiFi connection).
2. Close laptop (puts laptop to sleep
3. Sometime later (i.e. more than 5 mins) open laptop and enter password
4. Wi-Fi immediately re-established and after a short delay Viscosity starts reconnecting and after a bit reconnects to VPN
5. Sometimes an network communicating application will then lockup (into "Force Quit mode")

From watching/checking it looks like the issue is caused because immediately on resume the locked-up app has a good network connection (i.e. before Viscosity has started trying to reconnect) but after a brief time Viscosity has started and the network connection has been stopped (whilst Viscosity re-connects to VPN ?) or the network suddenly "changed under the app" - in that good connection suddenly changes IP address/route/etc.

I appreciate that this is probably an issue with the app not detecting or recovering properly but, Question: Is there any way in Viscosity (or under macOS) to prevent any network connection being established on resume from sleep before Viscosity has established the link through the VPN (or the user has told Viscosity to give-up).
Hi StuartM,

You can use standard firewall software to prevent non-VPN tunnel traffic on your normal network interface, or a tool that controls outgoing network connections, to prevent applications from using your normal network connection.

You can also turn off the automatic connect on wake behaviour if desired under the General section in Viscosity's Preferences window.

Another option is to delay Viscosity's attempt to reconnect on wake longer to see if that helps. If you type the following command into the Terminal (/Applications/Utilities/Terminal.app) and then quit and reopen Viscosity you can create the time Viscosity will wait.

Code: Select all

defaults write com.viscosityvpn.Viscosity ConnectOnWakeDelay -int 10

In the above example 10 is the number of seconds Viscosity will wait before reconnecting - you are welcome to change this value.

That said, we've never heard of such hangs happening before. I would see if they could be getting caused by another network related application that may be attempting to change network settings up wake. Some DNS tools are known to cause issues.

Cheers,
James
2 posts Page 1 of 1

Copyright © 2016 SparkLabs Pty Ltd. All Rights Reserved. Privacy Policy