iven / juniper-vpn-py Goto Github PK
View Code? Open in Web Editor NEWThis project forked from russdill/juniper-vpn-py
Python Juniper VPN Authenticator
License: GNU Lesser General Public License v2.1
This project forked from russdill/juniper-vpn-py
Python Juniper VPN Authenticator
License: GNU Lesser General Public License v2.1
Juniper VPN Authenticator: This script authenticates with a Juniper VPN server to generate a session cookie (DSID), and then passes that cookie to a VPN client. Example usage with openconnect: ./juniper-vpn.py --host vpn.example.com --user joeuser --stdin DSID=%DSID% \ openconnect --juniper %HOST% --cookie-on-stdin This will connect to vpn.example.com and prompt the user for a authentication password. Once authenticated, the session cookie will be passed to openconnect which will connect to the VPN. Note that because the DSID provides full access to the VPN, it can be easily passed via stdin to avoid having it show up in the process list. Juniper Networks Host Checker: A python module, tncc.py, is integrated with juniper-vpn.py and provides support for VPN sites which require a host checker step. It is currently only tested on a subset of sites and does not yet support sites that require periodic host checker updates. Command line options: juniper-vpn.py [-h HOST] [-u USERNAME] [-o OATH] [-c CONFIG] [-s STDIN] \ <external program> <external program arguments...> -h --host VPN server to access. This option is required. -u --username Username to authenticate with. This option is required. -o --oath OATH key to use for OTP generation if required for authentication. Key should be in hex format. -c --config Config file. Rather than passing arguments on the command line, they can be contained within a config file. Command line arguments override config file options. See sample.cfg for documentation. -s --stdin Provide input to external program. This allows the cookie to be passed on stdin, avoiding having it appear in the process list. The string %DSID% will be replaced with the DSID cookie value. The string %HOST% will be replaced with the server hostname. <external program> <external program arguments...> Runs the external program with the supplied arguments when a cookie is generated. %DSID% in any argument is replaced with the DSID cookie value. %HOST% in any argument is replaced with the server hostname. If the external program returns a positive return code, it is assumed that a fatal error has occurred (such as bad command line arguments) and the script exits. If the external program returns -EPERM, it is assumed that the DSID is no longer valid and a new one is generated. For all other return codes, the external program is simply called again. An external program is required. Running without root or tun access: openconnect provides two options for running without any special permissions. The first option is to create a tun device in advance and configure permissions for user access. The second is to redirect the traffic for the tun device to an external program. This external program can then configure a user-level SOCKS proxy: ./juniper-vpn.py -c example.cfg -s DSID=%DSID% \ openconnect --juniper %HOST% --cookie-on-stdin --script-tun \ --script "tunsocks -D 1080" Both tunsocks and ocproxy can perform this role: http://github.com/russdill/tunsocks http://repo.or.cz/w/ocproxy.git
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.