Giter Club home page Giter Club logo

msjnc's Introduction

msjnc -- MadScientist JNC Session Manager

This script manages the Juniper Network Connect VPN service. It is a replacement for the HTML/Java based toolkit provided by Juniper.

Installation

Download and make executable (by running chmod 755 msjnc), then run.

You can find the utility in your applications menu, or invoke it directly from the command line.

Full documentation is available by running perldoc msjnc.


[Flattr this git repo](https://flattr.com/submit/auto?user_id=madscientist&url=https://github.com/madscientist/msjnc&title=MadScientist JNC Session Manager&language=&tags=github&category=software)

msjnc's People

Contributors

lzh9102 avatar madscientist avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

msjnc's Issues

msjnc won't disconnect

Every time i start / stop my laptop or start / stop msjnc, it always says it is connected to the server. I no longer have a connection to the internet and cannot seem to find the steps to be able to debug this.

I've tried using msjnc --disconnect and that doesn't seem to work.

also, deleting my wireless connection and re-adding, i'm not sure what service i should attempt to manually kill to be able to connect to the internet.

Is there any information that I can provide that would be helpful in correcting this problem?

Thanks!

"Port" parameter not being passed to ncsvc correctly?

The host for our VPN is on HTTPS, so the msjnc profile has set the "port" property to 443. This is passed to the ncsvc client command as the "-P 443" option, however I don't think this works as intended as the ncsvc client appears to try and bind to my local port 443 rather than the remote vpn host. My local 443 is already in use by VMWare workstation server.

I have seen this same problem reported somewhere on ubuntuforums.

Editing my local msjnc profile to remove the value for "port" fixes the problem.

Ports conflict with CrashPlan by default

CrashPlan by default uses ports 4242 and 4243 for its service control between the main service and the UI. Unfortunately it appears that ncsvc also wants to bind to port 4242 when starting up, so if you have CrashPlan running, you get an error in the ncsvc log:

IpcConn.error bind failed to port 4242. Error 98 (ncipc.cpp:75)

Could we add a reference to the docs to look out for that? You can follow these instructions to change the port numbers CrashPlan uses (since unfortunately I don't think there is an option to change ncsvc's ports).

msjnc menu doesn't work on Ubuntu Unity?

Hi @madscientist, thank you for msjnc! ;-)

I had your v2.4 (27 Sep 2012) completely working for a long time, and Connect still does, but it looks like some Ubuntu update broke its menu bar - both in the Appearance Behaviour "Show the menus for a Window In the menu bar" as well as with the "In the window's title bar" setting, is that possible? Perhaps you need to upgrade the GUI toolkit library?

I've just tried out the v2.5 (17 Feb 2013), but with that the GUI never even shows up. For both 2.4 and 2.5 the ~/.msjnc.log only shows "MadScientist JNC Session Manager ..." and "Started graphical session with PID ..", without any errors.

Let me know if I can provide any further information (versions of any libraries or such), or if you would like me to try something from an experimental branch to see if it helps with this.

Add support for system installs

It would be nice if this supported systems installs. Doing so could ease deployment.

By default the NC Class looks for the binaries in /usr/local/nc and the RPM installs them there. Converting the RPM is easy with Alien.

$ DEB_HOST_ARCH=i386 alien ncui-7.4R1.i386.rpm

The same thing could be achieved with a tarball. The only things missing are the icon and getx509certificate.sh script. These could be could be substituted with GPL versions, maybe.

I'm able to get this mostly working just by hard-coding $JNCPATH to /usr/local/nc. Because of the dependencies on the icon and script I still have to download the Jar file, but after this it works (nearly) without a hitch. The biggest problem is the lack of status; the system installed binaries log to /root/.juniper_networks/network_connect/<bin_name>.log.

Multi-key logins not supported?

When configuring a profile, msjnc asks for just a single "password OR PID+SecureID". However, for our VPN, we need both a primary password AND the PID+SecureID secondary password. I don't suppose this is supported is it?

Thanks for your work on this great script.

Restarting msjnc with a connected session can't find the pid

Here's the log snippet:

2013-09-17 09:34:13-0500: MadScientist JNC Session Manager 2.5 (17 Feb 2013)
2013-09-17 09:34:13-0500: Session: Change from Disconnected to Connected
2013-09-17 09:34:13-0500: Session: Log says Connected, but no PID: disconnecting.

Here's where it's failing:

sub _getpid {
    my $arg = $_[0] ? "-p '$_[0]'" : '-e';
    # This appears to be the most portable option.
    # Kind of gross that we may have to run ps(1) on every update, but...
    local $_ = `ps $arg -o pid= -o comm=`;
    return m,^\s*(\d+)\s(?:.*/)?ncsvc$, ? $1 : 0;
}

I don't understand why it's failing though. If I move the begin/end line (^ $) on the return regex everything works fine.

Fedora 19:
perl --version:
This is perl 5, version 16, subversion 3 (v5.16.3) built for x86_64-linux-thread-multi
ps --version
procps-ng version 3.3.8

In case it's relevant. But as far as I can tell the ps output does have begin and end of line.

Remote command line execution

I've found this script very useful...thank you for your work.

I have a use case that is presenting problems. I am trying to use a remote machine as a "VPN portal". I log into the machine via SSH, and try to start msjnc using my typical command line options but I get:

Gtk-WARNING **: cannot open display: at /usr/lib/perl5/Gtk2.pm line 138.

I didn't think it opened a window when I used command line locally on the machine, but it seems I'm erroring out because it can't find a display to draw a window on. Is there an easy workaround? Or perhaps this is a feature request that simply says "don't do any GUI stuff"?

Thanks,
bru

MSJNC will not disconnect

This continues the recently closed bug #6 where by msjnc will not disconnect.

I have restarted, pulled the network connection, and various other things all of which do not work.

I am running Ubuntu 12.04.

Network Manager plugin

NetworkManager is a set of co-operative tools that make networking simple and straightforward. Whether Wi-Fi, wired, bond, bridge, 3G, or Bluetooth, NetworkManager allows you to quickly move from one network to another: once a network has been configured and joined, it can be detected and re-joined automatically the next time its available.
It is widely used (Gnome, KDE, xfce...) and supports AnyConnect, that is bit similar to JNC, through openconnect.
I am not sure, sould it be implemented as NetworkManager plugin or implemented directly in openconnect.

msjnc doesn't start

Just tried the script on a fresh build of Ubuntu 13.04. The script exits without an error code but nothing else seems to happen.

I'm afraid I don't know much perl but adding in some extra logging it seems to get to line 1657:

my $window = Gtk2::Window->new('toplevel');

And exits. Any ideas as to what might be happening?

status detection based on ncsvc.log is too brittle and should be implemented differently

The way in which msjnc currently detects connection status at start-up by parsing ncsvc.log is too brittle:

In a situation where your box crashes / you have to hard reset restart while the VPN is connected up and running (and so ncsvc.log is not clean anymore), when you restart and relaunch msjnc it insists that you are still connected (which of course you are not anymore after an OS restart), and whatever you do does it not manage to let you disconnect to force clear it's state so that you can then connect again.

The "workaround" I found after reading the msjnc Perl source is to just rm ~/.juniper_networks/network_connect/ncsvc.log - easy once you know about it... ;-) But a frustrating hour before that.

Sorry for only ranting and not actually proposing a patch! Hopefully just feedback instead actual code is a (small) form of contribution as well... Thank You for msjnc!!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.