Git Product home page Git Product logo

nxbender's Introduction

nxBender

a simple Python client for netExtender VPNs (SonicWALL/Dell)

Supports basic IPv4 connectivity with routing and DNS.

Requirements

You can install the package with:

    pip install .

You will also need pppd.

For manual development, install Python dependencies with:

    pip install -r requirements.txt

Usage

Very simply:

    sudo nxBender --server my-sslvpn-host.com -u username -p password -d domainname

-p password is optional, if not supplied it will ask interactively on the commandline

You can supply the server's SSL certificate fingerprint with --fingerprint if you're using self-signed certificates or if you want pinning.

Options can also be placed into a configuration file - defaulting to /etc/nxbender or ~/.nxbender - such as:

    server = my-sslvpn-host.com
    username = username
    password = password
    fingerprint = 9d:6a:fe:04:78:93:b0:a5:38:a0:04:ac:d2:10:cb:f7:9c:42:cf:74

Portability

At present the VPN routes are set up using pyroute2, which uses Linux's netlink interface to manage routing. A cross-platform approach could use ip and route binaries instead.

The output of pppd is parsed to determine the remote gateway address rather than using the ip-up mechanism, to avoid headaches caused by differences in implementation between distributions (somewhere Dell's client trips up). This might prove fragile, but pppd is very stable nowadays.

Why?

The official client is a pain to use; it only works out of the box on some very specific Linux flavours, has little useful debugging output, and I had to disassemble the binaries to even get it working on Gentoo.

The CLI component also has a number of painful behaviours, including requiring user input to acknowledge self-signed certificates - even when reconnecting during a session - and with no way to store the fingerprint for some reason; so acceptance can be automated with expect but is then vulnerable to MitM. It frequently leaves entries in resolv.conf when the VPN is down, breaking DNS for the entire system.

When I took a peek the protocol was trivial so I spent a couple of hours on a Sunday smashing out a replacement. Thus far it has proven quite reliable.

TODO

Not currently implemented are:

  • IPv6
  • DNS search suffixes
  • auto reconnection
  • configurable timeouts/link loss detection

nxbender's People

Contributors

abrasive avatar larswolter avatar runephilosof avatar

Watchers

James Cloos avatar  avatar

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.