Using openconnect on Ubuntu 15.10 fails

To use openconnect in Ubuntu 15.10 you have to set a default route to the tun0 device that is opened up. Otherwise no traffic will be routed through the tunnel. To do so:

sudo openconnect https://yourvpn.com

wait until the connect banner passes and openconnect displays:

Connected tun0 as ##.###.###.##, using SSL

Then open a new tab on the console or put openconnect in the background. Enter

sudo route add default gw ##.###.###.## tun0

This will route all outgoing traffic to the default gateway which is your tunnel.

Theres a bug opened up in ubuntu launchpad. While it is being investigated/fixed you can use above hack to still use VPN with openconnect.

Bug: network-manager-openconnect / 1502847
Via: openconnect-vpn-setup-is-failing-in-ubuntu-15-10