I updated to the latest version this morning and since then have been getting disconnected roughly every 10 to 20 mins and forcing me to quit viscosity and restart it again. I've taken some of the advice re ping and ping restart times, both of which were 0 before I changed them to the suggested 10 and 3600 which hasn't made a difference. My log keeps showing the message

2018-07-05 15:55:58: WARNING: INSECURE cipher with block size less than 128 bit (64 bit). This allows attacks like SWEET32. Mitigate by using a --cipher with a larger block size (e.g. AES-256-CBC).

I don't know if it's connected to the disconnection as i've never looked at the log previously so have never seen it before today.

I just restarted viscosity a moment ago and the log gave the following

Yes, what you're seeing is related to the SWEET32 warnings. You're most likely using two-factor authentication (via the username/password prompt) and/or session tokens are enabled on the server for another reason, which is clashing with OpenVPN's attempt to mitigate the SWEET32 attack. I've included a discussion of what is going on below, along with a few ways to resolve it.

Basically, SWEET32 is an attack against the older encryption cipher OpenVPN used to default to (BF-CBC). The server you're connecting to is set up to still use it, which is why you're seeing the warnings. To help reduce the likelihood of a successful attack against this old cipher, OpenVPN will by default change your connection to "renegotiate" every 64 MB of traffic through the connection. In your case you're hitting the 64 MB amount every 10 to 20 mins.

A renegotiation is a bit like a reconnection, where a new encryption key is renegotiated. However, this means when a renegotiation attempt occurs you also need to authenticate again with the OpenVPN server. OpenVPN caches a copy of your username and password and sends this along again automatically so you don't need to be prompted constantly. However, if you're using two-factor authentication where these details change each time, then they'll no longer be seen as valid by the OpenVPN server and you'll be disconnected.

There are a number of ways to can resolve this:

1. Get in touch with the administrator of your OpenVPN server and let them know that their current setup is vulnerable to the SWEET32 attack, and that they should change to a more secure cipher, such as AES-256-CBC. This can be done in a backwards compatible way by upgrading the OpenVPN server to version 2.4 and enabling cipher negotiation (so any other older clients connecting will not lose access). More information can be found at: https://community.openvpn.net/openvpn/wiki/SWEET32

2. For a quick fix, you can simply add the command "reneg-bytes 0" (without the quotes) as an advanced command to your connection. This will disable OpenVPN's renegotiation every 64 MB of traffic. See the guide below for how to specify advanced commands. However this does make your traffic theoretically vulnerable to the SWEET32 attack, so we do highly encourage the setup be changed to use a secure cipher instead.https://www.sparklabs.com/support/kb/ar ... n-commands

3. Add the command "auth-nocache" (without quotes) as an advanced command to your connection. This means instead of being disconnected you'll instead be prompted for your username and password each time a renegotiation attempt occurs.

Finally, the above SWEET32 warnings and renegotiations were taking place in Viscosity 1.7.9 as well. However, you've probably not noticed them until version 1.7.10, as OpenVPN was making use of "session tokens". Instead of caching the username and password it cached a unique token representing your VPN session, and used this in place of the username and password when a renegotiation occurred. However we've opted to disable session tokens being used for renegotiations in version 1.7.10 (they're still used when fully reconnecting, sleeping and then waking your computer, etc.) as there were a number of problems with the implementation in the current OpenVPN version (e.g. handling expired tokens). Their use is expected to be fixed in the next OpenVPN update.

Thank you so much for the reply and your explanation. Much appreciated.I have contacted PIA and they have given me new configurations to AES-256-CBC ciphers to try. After a bit of confusion it seems to be holding so far. I'll let you know if it falls over again.