Page 14 of 56 FirstFirst ... 4121314151624 ... LastLast
Results 131 to 140 of 554

Thread: HOWTO set up Juniper Network Connect VPN on Ubuntu Dapper

  1. #131
    Join Date
    Dec 2007
    Beans
    3

    Re: HOWTO set up Juniper Network Connect VPN on Ubuntu Dapper

    Quote Originally Posted by casuarina View Post
    Based on the information in this page, I,
    I wrote a script to instaal on 7.04 and 7.1.10.

    Enjoy!

    http://ubuntuforums.org/attachment.php?attachmentid=48315&d=1193675395
    Everyone - thanks for the fine work on this thread!

    I've made a fresh install of 7.10 and used this script to setup Juniper. It works great - for 20 minutes then times out.

    Prior to it timing out I noticed that the Network Connect dialog box shows COMPRESSION=NULL. Right at the 20 minute mark, the COMRESSION=DEFLATE and I no longer can access the VPN.

    Any ideas?

    Thanks,

    Beltratc

  2. #132
    Join Date
    Jun 2006
    Location
    Lexington, MA
    Beans
    183
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: HOWTO set up Juniper Network Connect VPN on Ubuntu Dapper

    I got tired of messing with my browser to enable/disable the VPN so, based on my own investigation and some info posted by others, I created a shell script that invokes the VPN. I put a Hardy beta release up into a VMWare instance and wrote a how-to guide for getting it working, with a few screenshots.

    I've used my script on Gutsy (Ubuntu 7.10) as well, although I did it by hand rather than follow those directions.

    Find the directions here: http://mad-scientist.us/juniper.html

    Let me know if you have problems!
    "Please remain calm...I may be mad, but I am a professional." --Mad Scientist

  3. #133
    Join Date
    Sep 2006
    Beans
    Hidden!

    Re: HOWTO set up Juniper Network Connect VPN on Ubuntu Dapper

    Great how-to, madscientist. Nicely summarises all of the information needed to get things running.

    Unfortunately after upgrading my laptop from Gutsy to the current beta of Hardy, Network Connect stopped working.

    All of the components are in place, but ncsvc reports an error:

    Code:
    ./ncsvc: symbol lookup error: ./ncsvc: undefined symbol: __builtin_new
    I'm guessing there's a shared library that's been updated/modified in Hardy. Anyone else seeing this issue?

  4. #134
    Join Date
    Apr 2008
    Beans
    1

    Re: HOWTO set up Juniper Network Connect VPN on Ubuntu Dapper

    Yeah I had the exact same issue.

    I tried to just link the new library but that didn't work.

    I don't know if it was wise but this is how I fixed it.

    Download libstdc++2.10-glibc2.2_2.95.4-27_i386.deb get it from here

    Code:
    sudo dpkg -i libstdc++2.10-glibc2.2_2.95.4-27_i386.deb

  5. #135
    Join Date
    Jun 2006
    Beans
    19
    Distro
    Ubuntu 6.06
    Excellent how-to, madscientist. However ... no joy for me after Gutsy upgrade to Hardy 8.04.

    I think my VPN host requires a cookie or something else from the browser as I couldn't get the authentication to work using your script. I'm reasonably confident my: HOST/USER/CERT/REALM parameters are correct as the applet loads (it doesn't if REALM is incorrect for example), but authentication fails, eg:

    ncapp> Failed to connect/authenticate with IVE. Error 104
    ncapp> Incorrect credentials. Please check the username/password/realm.
    The following borrows from the past few posts.

    Initially I had the same issue as fluffy (above), eg:
    Code:
    ./ncsvc: symbol lookup error: ./ncsvc: undefined symbol: __builtin_new
    The suggestion from powermac worked fine, eg:
    Code:
    sudo dpkg -i libstdc++2.10-glibc2.2_2.95.4-27_i386.deb
    At this point I get:
    Code:
    ~/.juniper_networks/network_connect/ncsvc --version
    Juniper Network Connect Server for Linux.
    Version         : 1.2
    Release Version : 5.3-0-Build10197
    Build Date/time : Feb 15 2006 18:21:55 
    Copyright 2002-2006 Juniper Networks
    The problem now is the incompatible shell scripts provided. I overcame this by modifying the originals and using chattr to prevent nc from overwriting with the originals (I think from an earlier post).

    I created modified "source" copies in: ~/.juniper_networks/ and created a new shell script to update them, eg:

    1) ~/.juniper_networks/src_installNC.sh

    Code:
    echo "Ubuntu compatible version of installNC.sh"
    
    # Install the service
    
    echo "executing $0 with params: $*" 
    
    #if(("$#"<"1"))
    if [ "$#" -lt "1" ]
    then
            echo "Insufficiant number of parameters"
            echo "$0 <install dir>"
            exit;
    fi
    
    if [ -e "$1/ncsvc" ] 
    then
            echo "Service already installed"
            ok="done"
    else
            echo "Service needs to be installed for the first time."
            ok="try"
    fi
    
    until [ "$ok" = "done" ]
    do
            echo "Please enter the root/su password"
            su root -c "install -m 6711 -o root $1/../tmp/ncsvc $1/ncsvc"
            if [ "$?" -eq "0" ] 
            then
                    cp $1/../tmp/version.txt $1/
                    ok="done"
                    rm -rf $1/../tmp
            else 
                    echo "Invalid su password and/or Unable to install ncsvc"
                    echo -n "Do you want to try again (enter y to try again):";
                    read choice;
                    if [ "$choice" != "y" ]
                    then 
                            ok="done"
                    fi
            fi
    done
    chmod 744 $1/ncdiag
    2) ~/.juniper_networks/src_xlaunchNC.sh
    Code:
    #!/bin/sh
    # launch to install the service
    # 20051220 : Javeed : Added -n to modprobe for dry run. We dont want to insmod, just check if tun
    #                                               is available.
    
    echo "Ubuntu compatible version of xlaunchNC.sh"
    
    echo "executing $0 with params: $*"
    
    #if(("$#"<"1"))
    if [ "$#" -lt "1" ]
    then
            echo "Insufficient number of params"
            echo "$0 <install dir> "
            echo "$*";
            exit
    fi
    
    #echo "$*";
    
    #moved code from installNC.sh to here so that we call xterm only if needed.
    flag=1
    
    if [ -e "$1/ncsvc" ] 
    then
            if [ -e "$1/version.txt" ] 
            then 
                    old_version=`grep -i "Version" $1/version.txt | cut -f 2 -d " "`;
                    new_version=`grep -i "Version" $1/../tmp/version.txt | cut -f 2 -d " "`;
    #               echo "$old_version == $new_version"
                    if [  "$old_version" \< "$new_version"  ]
                    then
                            echo "Need to install the new service"
                    else
                            flag=0;
                            echo "No difference found"
                    fi
            fi
    else
            echo "Service needs to be installed for the first time"
    fi
    if [ "$flag" -eq "1" ]
    then
        echo "calling $1/installNC.sh" >> $0.log
        chmod 744 $1/installNC.sh
        `xterm -e $1/installNC.sh $1`
    fi
    
    #export LD_LIBRARY_PATH=/usr/X11R6/lib
    
    # no need to check for ncui. Have to check for openssl package and tun driver.
    #ldd $1/ncui | grep "not found" | tr -d "\t" | cut -d " " -f 1 | tee $1/missing_libs
    # check if modprobe can locate the tun module. 
    #Adding dry run option we dont want to insmod, just check if tun is available
    
    rm -rf $1/missing.rpt
    /sbin/modprobe -n tun 1> $1/missing.info
    if [ "$?" -ne "0" ]
    then
        echo "Modprobe for Tun driver failed." > $1/missing.rpt
    #    rpm -q tun 1> $1/missing.rpt
    fi
    #check if openssl is installed
    rpm -q openssl 1>> $1/missing.info
    if [ "$?" -ne "0" ]
    then
        echo "RPM query for openssl failed." >> $1/missing.rpt
    fi
    3) ~/bin/juniper_update:
    Code:
    #:!/bin/bash
    
    ncpath="$HOME/.juniper_networks/network_connect"
    src_installNCsh="${ncpath}/../src_installNC.sh"
    src_xlaunchNCsh="${ncpath}/../src_xlaunchNC.sh"
    
    if [ -d ${ncpath} ];
    then
      if [ -f ${src_installNCsh} ] && [ -f ${src_launchNCsh} ];
      then
        if [ -x "${ncpath}/ncsvc" ];
        then
          # display ncsvc version
          ${ncpath}/ncsvc --version
          # enable access to scripts
          sudo chattr -V -i ${ncpath}/installNC.sh
          sudo chattr -V -i ${ncpath}/xlaunchNC.sh
          if [ -w "${ncpath}/installNC.sh" ] && [ -w "${ncpath}/xlaunchNC.sh" ];
          then
            # overwrite with dummy version
            cp -v ${src_xlaunchNCsh} ${ncpath}/installNC.sh
            cp -v ${src_installNCsh} ${ncpath}/xlaunchNC.sh
            # prevent dummy scripts being overwritten
            sudo chattr -V +i ${ncpath}/installNC.sh ${ncpath}/xlaunchNC.sh
          else
            echo "unable to overwrite: ${ncpath}/installNC.sh, OR: ${ncpath}/xlaunchNC.sh"
            echo "must run using: sudo $0"
          fi
        else
          echo "Could not execute: ${ncpath}/ncsvc. Please ensure juniper network connect is \"installed\" first"
        fi
      else
        echo "Could not find: ${src_installNCsh}, OR: ${src_xlaunchNCsh}"
      fi
    else
      echo "ncpath is invalid: ${ncpath}"
    fi
    I tried to modify the originals just enough to make it work.

    Now the network connect applet loads as it always used to with Gutsy (via Firefox 3 beta5 and using a similar approach).

    Thanks again to all the above - it's quite a relief to have VPN access once again!
    Last edited by tc7; April 28th, 2008 at 11:09 AM. Reason: missed information

  6. #136
    Join Date
    Sep 2005
    Beans
    153

    Re: HOWTO set up Juniper Network Connect VPN on Ubuntu Dapper

    For people who upgraded to Hardy and stuff is now broken (app will not init): disable the GCJ mozilla plugin and install the official java mozilla plugin instead.

  7. #137
    Join Date
    Apr 2008
    Beans
    3

    Re: HOWTO set up Juniper Network Connect VPN on Ubuntu Dapper

    Quote Originally Posted by madscientist View Post
    I got tired of messing with my browser to enable/disable the VPN so, based on my own investigation and some info posted by others, I created a shell script that invokes the VPN. I put a Hardy beta release up into a VMWare instance and wrote a how-to guide for getting it working, with a few screenshots.

    I've used my script on Gutsy (Ubuntu 7.10) as well, although I did it by hand rather than follow those directions.

    Find the directions here: http://mad-scientist.us/juniper.html

    Let me know if you have problems!
    Hi,

    I am a big newbie here but I need to set this up so I can home work from my Vista x64 box. I.e. I'm running Ubuntu on VirtualBox and having issues.

    I'm running the Version 8 (Hardy something?) of Ubuntu. Now reading that I am totally unable to Google up a way to make sense of this bit:

    So, first download the junipernc script and put it somewhere on your PATH; I typically create ~/bin and add that to my PATH for these sorts of things but it's up to you.
    So, I discovered from the Ubuntu manual that scripts are normally in /etc. I went into there and found a bash_completion file that looked similar so I

    sudo cp bash_completion junipernc

    then I
    sudo gedit junipernc

    deleted the existing stuff and copied in all the junipernc code found at that link.

    However, the line about changing the path totally confuses me. I can't work out how to do that bit.

    Cheers
    Theo

    Edit: Hmm. I tried just running the junipernc script with sudo sh inside the etc folder and it ran as expected but when I put in my password in the 'SecureID' bit it just says the VPN is exiting then asks me if I want to try it again. This just seems to be a looping situation now.

    This is all really rather depressing...
    Last edited by TheoGB; May 4th, 2008 at 01:59 PM.

  8. #138
    Join Date
    Jun 2006
    Location
    Lexington, MA
    Beans
    183
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: HOWTO set up Juniper Network Connect VPN on Ubuntu Dapper

    Quote Originally Posted by TheoGB View Post
    Hi,

    I am a big newbie here but I need to set this up so I can home work from my Vista x64 box. I.e. I'm running Ubuntu on VirtualBox and having issues.
    Wow. You're really jumping in on the deep end. Networking using virtual machines is not always straightforward, even for people who are very knowledgeable about it.

    Before we spend a lot of time on this, can you give us more general information about what you want to be able to do if everything were working correctly? If what you really want to do is have your Vista system talk to your work environment via the VPN, then setting up the VPN in Ubuntu in a virtual machine on Vista will not really get you there. Not without a LOT of very tricky work with routing etc. that I'm certainly not prepared to describe to you, especially on Windows (I haven't owned a machine running Windows since Windows 3.1 back in the 90's). If that's what you want to do the only realistic way of doing it is to run Ubuntu as the main OS, then use VMWare or similar to run Vista as the virtual, or guest, OS. In this mode you can set up Vista to share the network connection of the host OS (Ubuntu), so when Ubuntu is connected to VPN, Vista can share that connection.

    If, instead, what you want to do is use Ubuntu to connect to the VPN at work but you don't need the host OS (Vista) to connect, then we can hopefully get you going.

    It may still be a bit tricky though: VPNs on virtual machines can suffer from a variety of issues.

    My advice is this: I'll tell you what you've done wrong so far and get you set up right. If it still doesn't work I recommend that you use a LiveCD or Wubi install of Ubuntu and see if you can get that working just to prove that it can be done.

    Quote Originally Posted by TheoGB View Post
    So, I discovered from the Ubuntu manual that scripts are normally in /etc. I went into there and found a bash_completion file that looked similar so I

    sudo cp bash_completion junipernc

    then I
    sudo gedit junipernc

    deleted the existing stuff and copied in all the junipernc code found at that link.
    Hrm. That's really... not right . I think you must have misread/misunderstood the comment in the Ubuntu manual. Configuration files (and sometimes scripts) are normally found in /etc. However, scripts that you would run as commands (like this one) are not in /etc. The system commands live in one of the directories /bin, /usr/bin, /sbin, or /usr/sbin (it's not worthwhile at this point to explain the differences between these, which are all down to convention rather than requirements anyway).

    In this case, though, the most important thing you've missed is that the script does NOT need to be run as root (the administrative account; using sudo). You should run it as yourself (not using sudo). It really doesn't belong in a system directory such as /etc, /usr/bin, etc. It should live in your own home directory (/home/<username>).

    My web page recommends making a /home/<username>/bin directory and putting it in there, then adding that to your PATH. Don't worry about that if you don't understand it. Instead, do this:

    1. Download the script from my page and put it on your Desktop.
    2. Right-click on the script icon on your Desktop, and select Properties.
    3. Choose the "Permissions" tab and check the box "Execute: allow executing file as program" (note: be very careful about this in general... only do this for files you trust).


    Now the file is executable (you can run it as a command). After we get it working we'll make an icon for it, but for now run it by double-clicking on it. You'll get a dialog asking you what to do; choose "Run in terminal" (so we can see any errors/messages). You should get a terminal window, followed by the requests for information as described on my page.

    Follow the directions and see where you end up. Post any odd messages that are printed on the terminal window (beware it will go away automatically when you quit the script, so cut/paste them somewhere else first).
    "Please remain calm...I may be mad, but I am a professional." --Mad Scientist

  9. #139
    Join Date
    Apr 2008
    Beans
    3

    Re: HOWTO set up Juniper Network Connect VPN on Ubuntu Dapper

    Hey cheers,

    Basically: my computer is at work. If I want to work at home I use an addresses that is extranet.mywork.tld. This runs a bit of Java and then lets me click START for a Juniper Networks connection to put me on the network.

    Then I start a remote desktop session to connect to my computer, refering to it by name as if I were on the network (which I now am).

    All this would be fine but Vista x64 doesn't support this so in my new computer I thought I'd just run VirtualBox with a Linux flavour and run remote desktop from there; further down the line I want this VB to be my web development machine to more closely match my online sites rather than run stuff in Windows.


    Anyway, initially I installed Ubuntu 7 and I got all this working, I think by following the first post in this thread. Y'know, I was going to mark it all down and I just didn't get a chance. Anyway, it connected and I got remote desktop fine. BUT, I was locked at 1024x768 and my native res is 1680x1050.

    So I attempted to set this and screwed the display up so it didn't even work any more. I deleted that partition then discovered about Guest Additions. I tried again with Ubuntu 7 and used Guest Additions and the following change to the xorg.conf (from a different forum)

    Section "Device"
    Identifier "Generic Video Card"
    Boardname "VESA driver (generic)"
    Driver "vboxvideo"
    BusID "PCI:0:2:0"
    Screen 0
    EndSection

    Section "Monitor"
    Identifier "Generic Monitor"
    Vendorname "Generic LCD Display"
    Modelname "Monitor 1680x1050"
    Option "DPMS"
    HorizSync 30-83
    VertRefresh 56-76
    Gamma 1.0
    EndSection

    Section "Screen"
    Identifier "Default Screen"
    Device "Generic Video Card"
    Monitor "Generic Monitor"
    DefaultDepth 24
    SubSection "Display"
    Depth 24
    Modes "1680x1050" "1280x1024" "1024x768"
    EndSubSection
    EndSection
    Note I had to manually do this because there was no way to select using the X-Windows stuff.


    Okay...next hell: I got all this working but (and via a few more wipe downs and reinstalls) I have discovered that Guest Additions screws up Firefox. How? It causes every Java initiation to ask if I trust the applet and once I say yes, it seems that it gives up anyway and doesn't do anything.

    GRRRRRR.

    So I thought I'd give Ubuntu 8 a try. This doesn't exhibit this Firefox problem...it has a different one. The Java runs but Juniper Networks never boots, even after I did the original changes in the start of this thread.


    So at the moment I've wiped down that Ubuntu 8 session already and got a bit frustrated. Essentially all I want is:
    - Ubuntu to run at my full screen resolution
    - extranet.mywork.tld to load up.
    - Juniper networks to connect.
    - Remote desktop to my work computer so I can work at home from this Vista x64 machine.


    When all that's done I'll get around to installing:
    - Apache
    - MySQL
    - PHP
    - Ruby on Rails

    (Wowsers!)

    Any advice on the first phase is much appreciated. For now I'll start a new Ubuntu 8 version and do what you've said.

    Cheers
    Theo
    -

  10. #140
    Join Date
    Apr 2008
    Beans
    3

    Re: HOWTO set up Juniper Network Connect VPN on Ubuntu Dapper

    Hmm.

    Okay, well I did it correctly this time. The script runs, takes in the appropriate details, though having never been asked a 'Service Realm' I just took the default one that was there. I put in the password, it thinks, and then says "VPN has exited successfully" but I see no signs of Juniper Networks connect actually running.

    However, I'm not sure it ever installs on my system anywhere. Odd. I'm going to give this another try from Ubuntu 7 and get back to you, because the way Firefox acts in each system is very different...

Page 14 of 56 FirstFirst ... 4121314151624 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •