1

Previously, on Ubuntu 15.04, I had managed to follow this guide

http://ubuntuforums.org/showthread.php?t=2275776

and get the Juniper Network Connect to work properly from Firefox and connect to my organization's VPN.

After upgrade to 16.04, the Java applet that is supposed to establish the VPN connection does not even start. I do not get any prompt to run the applet (as I used to): the page just says "Please click the START button ONLY if reconnection is required. " and there is no start button anywhere.

I have tried re-installing java (and firefox) and re-follow the guide at the link above but it didn't work.

I have the oracle java 8 installed (as prescribed by the guide), including the firefox plugin set to "always activate". My first instinct was that somehow firefox was preventing the applet to run, but other than enabling the plugin, I do not know what to do.

Any help is appreciated.

7 Answers7

5

I recently needed to get this working as well. It's quite tricky. The main points:

  • You must install 32-bit Firefox (16.04 ships with the 64-bit version)
  • You must install 32-bit Oracle Java (not OpenJRE)
  • You must manually install the 32-bit Firefox plugin.

You cannot use the webupd8 Java installer to install Oracle's Java because it will always match your architecture and install the 64-bit version. Firefox will only run plugins that match its binary (32 or 64-bit).

Going through all of these steps:

  1. Purge your previous versions of Java: sudo apt-get purge openjdk* sudo apt-get purge oracle-java*
  2. Set up apt-get to retrieve 32-bit versions as an option. sudo dpkg --add-architecture i386 sudo apt-get update
  3. As in the original poster's guide, install the libraries needed by Juniper: sudo apt-get install libstdc++6:i386 lib32z1 lib32ncurses5 libxext6:i386 libxrender1:i386 libxtst6:i386 libxi6:i386
  4. Install Firefox 32-bit (this will automatically replace the 64-bit version): sudo apt-get install firefox:i386

  5. Manually download Oracle Java and install as described from this StackOverflow post or this Wiki. Make sure it's the 32-bit version. Here's the abbreviated installation instructions: mkdir /opt/java cp -r ~/Downloads/jre1.8.0_91 /opt/java/ update-alternatives --install /usr/bin/java java /opt/java/jre1.8.0_91/bin/java 1 update-alternatives --set java /opt/java/jre1.8.0_91/bin/java export JAVA_HOME="/opt/java/jre1.8.0_91"

  6. Now install the Firefox plugin. The other post recommends you put the plugin in the Firefox binary directory, but new versions of Firefox require you put plugins in your home directory under .mozilla/plugins: mkdir ~/.mozilla/plugins ln -sf $JAVA_HOME/lib/i386/libnpjp2.so ~/.mozilla/plugins/

  7. Restart Firefox and type about:plugins into the URL bar. You should see Java(TM) Plug-in 11.91.2 under the list.

    You can also confirm Java is working by visiting https://www.java.com/verify/

  8. Juniper looks in the wrong location for update-alternatives. Make a symlink from the real location to where Juniper will look for it: sudo ln -s /usr/bin/update-alternatives /usr/sbin/update-alternatives

Here are Oracle's official documentation, which I did not find helpful but it reinforces this solution as being correct:

  • Thanks a lot, Nate! Although your approach makes a lot of sense, it did not work for me. I still don't even get to the step where I am asked to install the nc applet. I am wondering whether different organizations run different versions of the juniper software? – Alberto C Jun 02 '16 at 23:21
  • Sorry to hear! It took me the better part of 2 days to get running on 16.04. I'll post another possible answer. – Nate Lampton Jun 08 '16 at 03:33
  • @NateHaug thanks a lot mate! Got it working in under 30 minutes following exactly these instructions. I did have the 32 arch enabled and libraries installed though. – Donbhupi Sep 15 '16 at 17:16
  • I am running on 16.10. The above steps helped me, it just worked as smooth as its defined. But one little improvement is its not necessary to purge as defined in step 1. You can always use "update-alternatives --config java" and choose from there by having multiple versions of java. – maxwells Nov 03 '16 at 19:59
  • Does this still work? As per https://support.mozilla.org/en-US/kb/npapi-plugins?as=u&utm_source=inproduct – golimar Feb 27 '20 at 14:53
  • OpenConnect has gotten so good, I would pursue that route instead. The gnome integration is perfect for Ubuntu 18.04+ (now that Gnome is the default instead of Unity): https://grepitout.com/install-openconnect-ubuntu-vpn-client/ – Nate Lampton Feb 28 '20 at 17:44
1

The OpenConnect VPN client has recently added support for Juniper VPN, supporting both TCP and UDP data transports.

I just had to install openconnect and execute command as explained here

# openconnect --juniper https://vpn.server.com/
100rabh
  • 121
0

As my first answer didn't help, maybe it's an entirely different problem: Java just isn't enable in the browser?

Double-check by opening the Java ControlPanel. You can open it by visiting the directory in which you installed Java (/opt/java/jre1.8.0_xx or /usr/lib/jre1.8.0_xx are common). Then open ./bin/ControlPanel:

cd /opt/java/jre1.8.0_91 ./bin/ControlPanel

Visit the "Security" tab and make sure that "Enable Java content in the browser is enabled".

You might also check under the "Advanced" tab, I made some changes in places:

  • Mixed code (sandboxed vs. trusted) security verification: Enable - show warning if needed.
  • Check for signed code certificate revocation using: Certificate Revocation Lists (CRLs) (Using OCSP caused problems for me in the past).
  • Perform TLS certificate revocation checks on: All certificate in the chain of trust
  • Check for TLS certificate revocation using: Certificate Revocation Lists (CRLs)
  • Thanks, Nate. Help is really appreciated. The Java plugin appears as "State: Enabled" in the about:plugins page. I have also checked the Java Control Panel and modified as you suggested, but the result did not change. – Alberto C Jun 13 '16 at 11:25
0

My setup used to be working for 14.04 (later upgraded to 16.04), but recently it started to break. Nate's method did not work, so something else is probably missing/misconfigured and preventing the java applet from installing. What I do know is that the server has an incomplete certificate chain when checked against ssllabs, so it can possibly lead to SSL errors.

What worked for me is downloading and invoking the NC.jar from command line, as recommended here: https://askubuntu.com/a/555112/43485

prusswan
  • 709
0

On (64-bit) 16.04 LTS it is not necessary to change to 32-bit Firefox. But you must use 32-bit Oracle Java (see also below). The following worked for me.

(Remove current Java versions)

Install java8-openjdk:

sudo apt-get install default-jdk

Close Firefox, install Firefox plugin:

sudo apt-get install icedtea-8-plugin

Restart Firefox, check addons for IcedTea-Web Plugin, go to: http://www.java.com/verify and check that it says java is installed.

Do NOT install 32-bit openjdk (using sudo apt-get install openjdk-8-jre:i386), instead install 32-bit Oracle Java because Pulse client greps for "Java version", see also other post 449922. You can debug yourself using Java console: itweb-settings

To install 32-bit Oracle Java:

Download jre-8u111-linux-i586.tar.gz from:

http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html

Extract and move to directory Oracle_Java (create if not there), result:

/opt/Oracle_Java/jre1.8.0_111

Run the following commands:

sudo update-alternatives --install "/usr/bin/java" "java" "/opt/Oracle_Java/jre1.8.0_111/bin/java" 1

sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/opt/Oracle_Java/jre1.8.0_111/bin/javaws" 1 

Check 64-bit openjdk and 32-bit Oracle jre are set:

sudo update-alternatives --config java

This should be something like:

---

There are 2 choices for the alternative java (providing /usr/bin/java).

Selection Path Priority Status

* 0            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081      auto mode

  1            /opt/Oracle_Java/jre1.8.0_111/bin/java           1         manual mode

  2            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081      manual mode

---

Fix path. This may give an error (ln: failed to create a symbolic link '/usr/bin/update-alternatives': File exists). No problem, the link already exists.

sudo ln -s /usr/bin/update-alternatives /usr/sbin/

Add architecture:

sudo dpkg --add-architecture i386
sudo apt-get update

Add libraries:

sudo apt-get install libstdc++6:i386 lib32z1 lib32ncurses5 libbz2-1.0:i386 libxext6:i386 libxrender1:i386 libxtst6:i386 libxi6:i386

Now connect to your VPN and you should get the message to install the software, after that you are connected.

I also have to change the mtu to 1000 after making the connection (depends on your VPN):

sudo ifconfig tun0 mtu 1000
Zanna
  • 70,465
peterpm
  • 39
0

In my case the problem was with absence of XTerm.

I turned on Java Console in Java Control Panel

enter image description here

And saw this in a log

Service needs to be installed for the first time
calling ~/.juniper_networks/network_connect/installNC.sh
Here is the standard error of the command (if any):

~/.juniper_networks/network_connect/xlaunchNC.sh: 1:
~/.juniper_networks/network_connect/xlaunchNC.sh: xterm: not found

After reinstalling xTerm it asked me for sudo password and everything started to work.

P.S. x32 Firefox version is unnecessary - for me it works fine on x64 version

Zanna
  • 70,465
Kanu
  • 101
0

You can connect Ubuntu 64bit Client to Juniper SSL VPN without 32bit Java, with command line.

This is a HOWTO you might need: http://blog.geeky.name/post/2016/03/29/HOWTO%3A-Ubuntu-Linux-64bit-Client-connect-to-Juniper-SSL-VPN-without-32bit-Java-%28en%29

Short instruction is:

# Install libs
sudo apt-get install libc6:i386 zlib1g:i386 libgtk2-perl libwww-perl

# Get files
wget https://raw.github.com/madscientist/msjnc/master/msjnc
wget http://mad-scientist.net/junipernc
chmod +x msjnc junipernc

# Using browser to download jar files from SSLVPN website

# Extract files
./msjnc

# Start VPN
junipernc --nojava
BlueT
  • 31
  • 3