Saturday, January 8, 2011

Howto: Ubuntu 10.10 + Juniper Network VPN

So work has me using Network Connect from Juniper to VPN into the internal network. I got it to work on almost every platform except my Ubuntu 10.10 Sony Ultralight. After hours and hours of banging my head I finally figured it out.

1) Network Connect does not like to use openjdk-6-jre which comes default on Ubuntu. I had to install sun-java.

sudo add-apt-repository ppa:sun-java-community-team/sun-java6
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts


Select Sun Java as your default Java. (don't know if this is necessary)

sudo update-alternatives --config java

2) There seems to be some sort of bug with Firefox and Network Connect which never initializes the Java applet. And I couldn't get the Official Java to work with Firefox. So I had to use Chromium, which is fine with me. I like Chromium.

sudo apt-get install chromium-browser

3) If you're anything like me, you tried to install Network Connect a billion times. Delete the ~/.juniper_networks/ in your home directory. Content and all. Just in case some sort of funkiness happened with your settings.

cd ~/.juniper_networks
rm -rf *
cd ..
rmdir .juniper_networks



4) Juniper's install script requires su. So put a password on the root user.

sudo passwd


5) Open Chromium. Type "about:plugins" in the url bar. Click on disable for "IcedTea NPR Web Browser Plugin" and make sure "Java(TM) Plug-in" is enabled.


6) Go to your company's VPN page, start up VPN, type in the root password of your system, and wa-la! It works. Well, it worked for me. I might be missing a step or two because I typed all this from memory. So let me know if you find any errors or can't get it to work.

Take care,

18 comments:

  1. Hello, thanks for the writeup. are you using a 64 bit version of Ubuntu?

    ReplyDelete
  2. No. 32-bit. I'm not sure if this will work on 64bit. But more likely it will. Let me know if it doesn't.

    ReplyDelete
  3. I wasn't able to get it to work with 64 bit ubuntu. I really wish it did though..

    ReplyDelete
  4. Hmmm... Did you try using the 32 bit versions of everything?

    ReplyDelete
  5. Hi, it is giving terminal not supported by browser

    ReplyDelete
  6. Hmmm... where is it saying that?

    ReplyDelete
  7. A relative noob to Linux, I have been trying to get Network Connect working on 32 bit Ubuntu 10.04 using Firefox 4.0 for the past week with no success. In the process I have read a lot of forums and tried a lot of things.

    Here is what my problem was :
    1) Login to my company VPN site successfully using username, password1(active directory) password2(RSA pin)
    2) Click on the Network Connect "Start" button, the applet loading page comes up for a short time and then takes me back to the previous page without the NC popup.

    I tried Mad Scientist's script (http://mad-scientist.us/juniper.html), which almost got me connected, but authentication failed since our company uses two passwords (active directory and RSA pin). The script was only asking for RSA pin, and I got failure stating "Invalid Credentials". But this did get the NC popup going.

    I read on this post that this issue may be caused by Firefox, so I installed Google Chrome and Voila! it worked perfectly. I see the NC connect popup and am able to access the company intranet on 32 bit Ubuntu.

    Also during my reading, I came across this post(http://makefile.com/.plan/2009/10/27/juniper-vpn-64-bit-linux-an-unsolved-mystery) which details how to connect using 64 bit Linux and two passwords. I tried this on a different machine running 64 bit Ubuntu, and it works as well.

    I hope this helps.

    ReplyDelete
  8. Hi,

    I'm also having issues with connecting to Juniper from Ubuntu. Basically, I don't really know much about Juniper but here's the situation:

    I browse to the juniper gateway of our client and login with my credentials. Then I see some links that normally should open a java-driven RDP to machines on our clients network.

    Before it even hung before I would even see the links but I've now installed the java-plugins and such and that works now. But when I click one of those links, I just get "This Terminal session is not supported on your computer."

    Any help is welcome!

    ReplyDelete
  9. This comment has been removed by the author.

    ReplyDelete
  10. Great write-up about network VPN, it helped me a lot. Thanks.
    us vpn

    ReplyDelete
  11. I got "config failed" message. What does it mean? I've no idea about vpn..

    ReplyDelete
  12. Great work! and with the Help of the http://mad-scientist.us/juniper.html and http://holyarmy.org/2009/06/vpn-on-ubuntu-linux-with-juniper-network-connect/ I put together the last couple of pieces

    Turn Off Iced Tea in Chromium bu browsing to Chrome://plugins

    To find out your Realm
    Finding your realm is fairly straight forward if you don’t mind diving into some HTML. Point your web browser to your company’s VPN website: https://vpn.mycompany.com or https://connect.mycompany.com . View the source of that page and look for a line like:

    #
    The value of REALMNAME is what you’ll need to enter when prompted. Your IT department may or may not know what this is if you ask them.

    Thanks everyone!

    ReplyDelete
  13. Cool. I also got it running on Ubuntu 11.10 on Chromebook Series 5. Oracle Java changed their licensing, so Ubuntu doesn't push updates anymore for Oracle's Java. You can google how to install Sun Java, and it should work... Something like.

    sudo apt-add-repository ppa:flexiondotorg/java
    sudo apt-get update
    sudo apt-get install sun-java6-jre sun-java6-plugin

    BUT notice that the ppa is some dude who puts out the Java bins. Probably not by Oracle's license. So YMMV. Also make sure that the default Java is the Oracle's Java or Network Connect won't work. Good luck.

    ReplyDelete
    Replies
    1. oh also, it was considerable more straightforward in 11.10 than 10.10. I did not need to install Chrome (it was already there), and I did not need to change the plug ins. Also, I did not need to put a password on su. But again, this is on a chromebook. Have fun.

      Delete
  14. Hi i am able to install juniper connect client perfectly, but afterwards i am unable to access the urls in the network. Even though the network connect client window is open and showing connected. How to switch the browser from your local network to vpn's network. Kindly guide...

    ReplyDelete
  15. Cool solution for VPN connection on Ubuntu.
    top10-bestvpn.com

    ReplyDelete
  16. Thank you.Good solution for VPN connection.
    It works fine.Nice VPN client.Cool blog.
    10webhostingservice

    ReplyDelete