Site icon Anhad

Cracking the Juniper Network Connect problem on Linux 64 bit

One of the most frustrating problems that I have ever worked on was to get this darn VPN connect work and I used a 32 bit Ubuntu for over a year and half on a 64 bit machine only because I could not get the VPN connect work.

Finally, with _due_ help from a colleague Ebben – I have a way to get things going on 64 bit Mint 12 (moved from Ubuntu recently as I hate Unity…).

The most useful resource in this regard are the Mad Scientist page and the Ubuntu forum thread  discussing this issue. Please refer these pages for 32 bit setup. I am devoting this post only for 64 bit and assuming most things are in place or you know how to set it for a 32 bit Linux.

Hoping the following are more than sufficient to get things going (at least on Mint which comes with Sun Java in place but I put the steps nevertheless) –

1. Install Opera – I chose opera as it works well for me and I could not get the 32 bit plugin work with the other 64 bit browsers. If it works for you kindly let know.

You can install the package using the command below –

$ sudo apt-get install opera      # assuming the repository is in place if not refer this.

2. Install Sun Java – Excerpt from the Mad Scientist page

On 32-bit Ubuntu I use:

sudo aptitude install sun-java6-plugin sun-java6-jdk sun-java6-jre

On 64-bit Ubuntu I use the above plus this:

sudo aptitude install ia32-sun-java6-bin

3. Get the 32 plugin in place

Ensure that the 32 Java plugin is pointed to from the browser of your choice. In opera –

Check the page opera:about for the plugins path and

$ cd /usr/lib/opera/plugins
$ sudo ln -s /usr/lib/jvm/ia32-java-6-sun-1.6.0.26/jre/lib/i386/libnpjp2.so

You can test the plugin using the URL – about:plugins

For opera it translated to opera:plugins

On refresh plugins I saw the Java related plugins in place –

Java(TM) Plug-in 1.6.0_26

Java(TM) Plug-in 1.6.0_26

NOTE: A restart of the browser might be necessary if you have already opened it – it worked for me without a restart! 🙂

4. You are good to go

Just key in the URL that connects you and this works like a charm as it would on a 32 bit Linux.

Hope this post helps you save _some_ time.

NOTE: I see that on 12.04 Sun Java can’t be installed using any repositories due to broken dependencies. I tried installing Oracle 7 as suggested here –

http://www.liberiangeek.net/2012/07/download-and-install-sun-java-6-7-in-ubuntu-12-04-precise-pangolin-easily-with-this-script/

I followed these steps –

$ wget https://github.com/flexiondotorg/oab-java6/raw/0.2.4/oab-java.sh 
$ chmod +x oab-java.sh

$ sudo ./oab-java.sh -7
$ sudo apt-get install oracle-java7-jre oracle-java7-jdk oracle-java7-plugin oracle-java7-fonts

Then I added the 32 bit plugin - 

$ sudo apt-get install ia32-oracle-java7-bin
$ cd /usr/lib/opera/plugins
$ sudo ln -s /usr/lib/jvm/ia32-java-7-oracle/jre/lib/i386/libnpjp2.so

Ok for those none of the above works there is some relief -

Ebben has also written this wonderful script jvpn which works like a charm for me now – https://github.com/earies/jvpn/blob/master/README

If the browser work around is failing or you want a better mechanism you can try Ebben’s script instead. These are the steps for jvpn to work

JVPN

1. Install the following –

$ sudo apt-get install ia32-libs gcc-multilib

2. Log into the Juniper Network Connect via browser to install the ~/.juniper_networks folder.

3. Remove the ncui binary –

$ rm .juniper_networks/network_connect/ncui

4. Run the jvpn script –

$ jvpn --site=XXX --curses
Password:  
ncui binary does not exist, would you like to compile now? (Y/N): Y
>> jvpn    : INFO     ncui binary does not exist, searching for shared object for compilation
>> jvpn    : INFO     ncui compiled successfully
>> jvpn    : INFO     Initiating VPN to: xxx-access.company.com
>> jvpn    : INFO     Authenticated
>> jvpn    : INFO     DSID found - caching to: /home/mynk/.jvpn/cache/xxx-access.company.com.dsid
>> jvpn    : INFO     Certificate file not found [/home/mynk/.jvpn/certs/xxx-access.company.com.crt]
>> jvpn    : INFO     Retreiving server certificate from: xxx-access.company.com
>> jvpn    : INFO     All values retreived - Connecting to VPN gateway
>> jvpn    : INFO     ncui started with pid: 8490
>> jvpn    : INFO     Connected to VPN successfully

Hope this works for you! 🙂

Exit mobile version