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

One Reply to “Using openconnect on Ubuntu 15.10 fails”

  1. Hi, Thomas. I tried your above mentioned hack, but the problem that I am facing is that though I am connected to the VPN but I’m unable to get access to the server. The connection gets closed from the server end as it takes too long to log-in into the server (times out). I also noticed that if I used gnome’s GUI to switch on the VPN, then my internet also kind of stops working. I’m unable to use the browser even to surf the pages. But if I add a route to the new IP exposed via openconnect from the terminal then I don’t get the problem of slowing of internet, but still access to the server is not possible. Any ideas as to what might be happening in this case? Thanks in advance

Leave a Reply

Your email address will not be published. Required fields are marked *