Posted by: terryhowe | October 26, 2012

Juniper Networks VPN Ubuntu 12.10 Fails Immediately

I’ve been having all sorts of problems off and on with the Juniper Network VPN connection.  I don’t have the exact pattern of what causes the problem, but I think I’ve seen it both with the machine hangs and when I disconnect the VPN normally.  Also, keep in mind, I’m using the Mad Scientists JNC script.  Anyway, what I see when I use the web interface is the GUI comes up for a couple seconds and fails.  I don’t see anything conclusive in the logs other than a most likely harmless “ncui.error Got signal 17” (a user signal).  When I run the jnc script, it claims the VPN is up, but no packets are sent or received.

The problem always boils down to a problem with the /etc/resolv.conf file.  It normally has stale information in it and I edit it and get some things working. What I think I really need to do is delete it and recreate a link to /run/resolvconf/resolv.conf.  This last time, I had to make an empty file there.  Once I had that file, I got get the VPN to start and work.

It may be related that the files /etc/jnpr-nc-hosts.bak and /etc/jnpr-nc-resolv.conf should (or perhaps should not) exist. Last time I was working on this, I recreated an empty /etc/jnpr-nc-resolv.conf file just before things started working. I had a copy of the hosts.bak lying around. I think the main problem is the Juniper scripts moves the symbolic link out of the way and creates a regular file. Next time you start up, the file is not updated and you get the stale resolv.conf file.

I also reverted the VPN changes to the hosts file, which didn’t make any difference. The thing that may be key is removing all the log files from ~/.juniper/network_connect directory.

Advertisements

Responses

  1. BTW, link to the Mad Scientists page http://mad-scientist.us/juniper.html

  2. http://askubuntu.com/questions/210048/error-when-running-binary-with-root-setuid-under-encrypted-home-directory

    I found the answer here, you may want to make a try.

  3. mv /etc/jnpr-nc-hosts.bak /etc/hosts
    mv /etc/jnpr-nc-resolv.conf /etc/resolv.conf
    echo “nameserver 172.20.1.1” >/run/resolvconf/resolv.conf
    rm -f ~terry/.juniper_networks/network_connect/ncsvc.log


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: