Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Ubuntu 9.10 is out!!!

When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu.

The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely.

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old August 8th, 2006   #1
madscientist
A Carafe of Ubuntu
 
Join Date: Jun 2006
Location: Lexington, MA
Beans: 148
Ubuntu 9.10 Karmic Koala
HOWTO set up Juniper Network Connect VPN on Ubuntu Dapper

Hi all; I recently started a new job and I needs my remote access! My previous employer used Nortel Contivity and I used the Apani Contivity client; this was a bit of a pain since it's a proprietary kernel module, but it worked well (and it supported split tunneling, which is sweet!)

My new job uses Juniper's Network Connect VPN, which does not use a KLM (nice!) but does not support split tunneling (boo!) It has a very nice feature where it will try to download and install the software to your system the first time you run it... and it supports Linux! Yay! But, it only supports Red Hat (and other RPM-based distros, most likely) Boo! However, I was able to get it working with a bit of playing around

First, let me hand out props to this Flexion.org blog post by Martin... it got me going! However, it's specific to Ubuntu 5.10 and perhaps an earlier version of Network Connect and I needed to do a few different things.

Here's what I had to do; make sure openssl and the proper libstdc++ libraries are installed, as well as Sun's Java:
Code:
sudo aptitude install openssl libstdc++2.10-glibc2.2 sun-java5-bin sun-java5-jre
The installer wants to use su, not sudo. I just set my root password to something while I installed it, then reset it again later (find out how).

The installer also wants to run RPM to make sure you have openssl etc. installed. Since it doesn't actually use RPM for anything other than a check, I decided to just make a fake rpm that always succeeds. Do this:
Code:
sudo ln -s /bin/true /usr/bin/rpm
Finally, the service application tries to dlopen() the openssl library (I'm assuming, since ldd doesn't show it) and it's looking for libssl.so.0, which does not exist on our system per se. So make it exist with a symlink:
Code:
sudo ln -s libssl.so.0.9.8 /usr/lib/i686/cmov/libssl.so.0
We're all set to install! Connect to your server and use the "Start" button next to "Network Connect" under Client Application Sessions. It will open a terminal and ask for a password for su: use the one you set above. It will then install and connect and all should be working well.

At this point you can undo some of the customizations above: you won't need a root password anymore so you can undo that, and you can remove the rpm link:
Code:
sudo rm -f /usr/bin/rpm
I've only tried the most basic stuff but it seems to be working well for me!
__________________
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
madscientist is offline   Reply With Quote
Old August 20th, 2006   #2
mcewanbr
5 Cups of Ubuntu
 
Join Date: Jun 2006
Beans: 18
Re: HOWTO set up Juniper Network Connect VPN on Ubuntu Dapper

I have done the same thing, except I didn't fake it out using your symlink method for rpm.

Instead, I edited the $HOME/.juniper_networks/network_connect/xlaunchNC.sh. Towards the bottom is the code that looks for rpm.
Code:
rpm -q openssl 1>> $1/missing.info
if [ "$?" -ne "0" ]
then
    echo "RPM query for openssl failed." >> $1/missing.rpt
fi
I just commented these lines out. Then I ran
Code:
chattr +i xlaunchNC.sh
...on the file to prevent the logon script from overwriting this file on future logins to the vpn and reseting it back to default.

Works great for me!

Last edited by mcewanbr; August 20th, 2006 at 12:48 PM..
mcewanbr is offline   Reply With Quote
Old September 26th, 2006   #3
timshadel
First Cup of Ubuntu
 
Join Date: Sep 2006
Beans: 2
Re: HOWTO set up Juniper Network Connect VPN on Ubuntu Dapper

I also had to

Code:
sudo apt-get install lesstif2
and

Code:
sudo ln -s /usr/lib/libXm.so.2 /usr/lib/libXm.so.3
so that if found libXm.so.

The dialog comes up, but it's filled with stuff like "label47". It's unreadable, but the VPN works great.
timshadel is offline   Reply With Quote
Old November 9th, 2006   #4
madscientist
A Carafe of Ubuntu
 
Join Date: Jun 2006
Location: Lexington, MA
Beans: 148
Ubuntu 9.10 Karmic Koala
Re: HOWTO set up Juniper Network Connect VPN on Ubuntu Dapper

I didn't need to install Motif or Lesstif. Weird!

However, after updating to Edgy I had problems: it wanted to reinstall every time I tried to start my session. It turns out that whomever is creating the install and setup shell scripts for these packages is a horrible shell scripter. Really, I can't remember when I've seen worse. It's one thing to have crappy scripts for internal processes but to release them to customers? If you work for Juniper please find out who is responsible for this and beat them with a clue stick; they're embarrassing your company.

Since in Edgy /bin/sh is really dash, not bash, and these scripts are in no way valid POSIX sh scripts, they break badly... but for no reason other than they're poorly written.

I've attached new versions of these two scripts. Copy them into ~/.juniper_networks/network_connect. I made them immutable with chattr +i, as described elsewhere in this thread, although I'm not sure that's necessary.

Hrmph. I can't attach anything. When I try to and click the upload button FireFox gives me a dialog saying I want to open newattachment.php and what application do I want to use? I tried "firefox" but that opened a blank window. So I guess if you need these, email me or send me a private message.
__________________
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist

Last edited by madscientist; November 9th, 2006 at 07:19 PM.. Reason: Can't attach files.
madscientist is offline   Reply With Quote
Old November 13th, 2006   #5
madscientist
A Carafe of Ubuntu
 
Join Date: Jun 2006
Location: Lexington, MA
Beans: 148
Ubuntu 9.10 Karmic Koala
Re: HOWTO set up Juniper Network Connect VPN on Ubuntu Dapper

Another hint: I was having my login session messed up every so often. After looking carefully I realized that my DHCP client kept rewriting my /etc/resolv.conf file every time my lease was re-acquired, so I was no longer using the VPN network's DNS servers. It was also rewriting the search string so searches for hostnames weren't being resolved correctly.

The solution I used was to disable setting of the domain-name and domain-name-servers in my DHCP client; this means that if my DHCP server changed this I wouldn't automatically know about it which is a bummer, but that's very unlikely so it's the lesser of two evils.

What you need to do is edit /etc/dhcp3/dhclient.conf, and remove the domain-name and domain-name-servers from the "request" attribute list. The docs are not very clear that this means that /etc/resolv.conf won't be updated, but in fact that seems to be the case. Note you need to restart the DHCP client; an easy way to do that is to run "sudo ifdown eth0" then "sudo ifup eth0" (or whatever your network interface is). I suppose you can also bring the interface down and back up through the GUI but I've had problems with that in the past.
__________________
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
madscientist is offline   Reply With Quote
Old November 17th, 2006   #6
lordmundi
First Cup of Ubuntu
 
Join Date: Oct 2006
Beans: 5
Re: HOWTO set up Juniper Network Connect VPN on Ubuntu Dapper

Question: I finally got the client to connect and work in my VMWare virtual machine of ubuntu, but as soon as it connected, the whole OS seemed to lock up.. and I think it may be because everything is getting routed through that adapter, and since I rely on NFS for my home dir and NIS for auth, that is probably killing it right?

Anybody else have this problem? So my question is (and I suppose people might want this even if they weren't having this problem), how do I selectively route to this java adapter/client instead of it redirecting everything to that adapter?

FG
lordmundi is offline   Reply With Quote
Old December 19th, 2006   #7
tworkemon
Just Give Me the Beans!
 
Join Date: Jun 2006
My beans are hidden!
Re: HOWTO set up Juniper Network Connect VPN on Ubuntu Dapper

madscientist, could you try to attach those files again ?? Also anyone get this to work with Feisty ??

Last edited by tworkemon; December 19th, 2006 at 04:48 PM..
tworkemon is offline   Reply With Quote
Old February 23rd, 2007   #8
madscientist
A Carafe of Ubuntu
 
Join Date: Jun 2006
Location: Lexington, MA
Beans: 148
Ubuntu 9.10 Karmic Koala
Re: HOWTO set up Juniper Network Connect VPN on Ubuntu Dapper

Quote:
Originally Posted by lordmundi View Post
Question: I finally got the client to connect and work in my VMWare virtual machine of ubuntu, but as soon as it connected, the whole OS seemed to lock up.. and I think it may be because everything is getting routed through that adapter, and since I rely on NFS for my home dir and NIS for auth, that is probably killing it right?

Anybody else have this problem? So my question is (and I suppose people might want this even if they weren't having this problem), how do I selectively route to this java adapter/client instead of it redirecting everything to that adapter?
The system will automatically create a virtual IP interface using tun, then set up routes to send the VPN-bound traffic to the new interface. It will also reset /etc/resolv.conf so that your DNS server is pointing to the server over the VPN, so you can resolve local addresses inside the VPN.

Either of these things may be causing you to have problems. If the connect is not working properly, or if it throws some kind of invalid value into /etc/resolv.conf, then you won't be able to resolve any hostnames and that can often make it look like your system is locked up. Check the contents of /etc/resolv.conf and make sure that the address(es) there for "nameserver" are accessible (you can try pinging them).

Also, if your remote site is using an overlapping IP address space, then you could have problems (although I don't think your system should lock up). For example, on my home network I'm using the common 196.168.* class B range. However, my work internal network also uses that same class B range (this is kind of bogus but...) Now all traffic that I want to send to my local systems will instead get routed through the VPN. Not good. To fix this I modified my local LAN to use one of the other reserved IP address spaces.
__________________
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
madscientist is offline   Reply With Quote
Old January 5th, 2007   #9
ariel
Way Too Much Ubuntu
 
ariel's Avatar
 
Join Date: Jul 2005
Beans: 315
Re: HOWTO set up Juniper Network Connect VPN on Ubuntu Dapper

Hi madscientist, could you make Juniper "Network Connect" work with Edgy? If so can you update this howto? For the scripts, instead of attachments how about a simple copy/paste on a port here ?

Thanks... hope you see this soon!
ariel is offline   Reply With Quote
Old February 23rd, 2007   #10
madscientist
A Carafe of Ubuntu
 
Join Date: Jun 2006
Location: Lexington, MA
Beans: 148
Ubuntu 9.10 Karmic Koala
Re: HOWTO set up Juniper Network Connect VPN on Ubuntu Dapper

Quote:
Originally Posted by ariel View Post
Hi madscientist, could you make Juniper "Network Connect" work with Edgy? If so can you update this howto? For the scripts, instead of attachments how about a simple copy/paste on a port here ?
It works fine with Edgy, using the same directions. I don't recall needing to do anything different.

I was able to get the attachment to work finally; check post #12 for this thread.
__________________
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
madscientist is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:52 PM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry