I got to do something new today - setup a VPN connection with work. Okay, that's not entirely new. For the longest time, I used Network Connect for the VPN. It worked great up until a couple of months ago. The VPN was upgraded and Network Connect wen the way of the dodo.
The new VPN uses Pulse Secure. There exists a Windows client and a Mac client. And I must say, they're pretty nice. Nothing for Linux though. A little Google searching and I came across OpenConnect. So I set about installing OpenConnect.
First, I checked the Ubuntu repositories for a pre-built package. The OpenConnect web site says that Juniper support starts in version 7.05. The Ubuntu package topped out at version 6.0. Note: This was Ubuntu 15.04. I found a PPA testing a 7.06 package for the next Ubuntu release. One more release and my success reverts to the dustbin of history.
Next I installed from source. It promptly crashed looking for a script named vpnc-script. On Ubuntu, that script comes from the vpnc package. Then the program crashed looking for a library. The library was built from the same source as the client program. It was loaded into one of the standard library directories. Ugh.
I tried several things. The ultimate solution - run ldconfig. ldconfig added the new library into its index. Ta-da! The client program ran perfectly.
It still, however, would not connect to the VPN. I used the -v option to see what was happening. The client failed parsing the login form. Just before termination, I saw two fields being ignored. Our VPN displays a confirmation dialog box asking you to proceed or cancel. I actually started digging into the source code for this one.
A quick grep found the warning message about ignored fields. The code compared the control names with a string for the submit button. The submit button name comes from the calling code. Nope, wait, it comes from the code that calls the calling code.
I changed the string to match our Proceed button. Compile, run, and Bob's your uncle! The VPN connected. I logged into the internal app server just to be sure.
So to recap...
- Install the vpnc package first.
- Change the submit button name in the source code.
No comments:
Post a Comment