Giter Club home page Giter Club logo

svpn-login's Introduction

F5 SSLVPN Command-line client

This project allows you to connect to an F5 Networks VPN server (BIG-IP APM) using the proprietary FastPPP protocol but without any graphical frontend.

Setup

Acquire svpn

The script requires svpn, which is a component of the BIG-IP Edge Client. If you already have the BIG-IP Edge Client installed, then you already have svpn.

Otherwise, if you are on macOS, you can get it by going to https://[your-VPN-server]/ in a web browser, clicking on "Edge Client - macOS", unzipping the file you downloaded, and running the installer that you unzipped.

If you are on Linux, choose one of the following options depending on which distro you run.

Distro Option
Ubuntu or Debian https://[your-VPN-server]/public/download/linux_f5vpn.x86_64.deb
CentOS/Red Hat https://[your-VPN-server]/public/download/linux_f5vpn.x86_64.rpm
Arch Linux Install the f5vpnAUR package

Acquire svpn-login

$ git clone https://github.com/zrhoffman/svpn-login.git
$ cd svpn-login

Basic Usage (supports two-factor authentication):

./svpn-login.py --sessionid=0123456789abcdef0123456789abcdef [hostname]

You can find the session ID by going to the VPN host in a web browser, logging in, and running this JavaScript in Developer Tools:

document.cookie.match(/MRHSession=(.*?); /)[1]

If your organization does not use 2FA and you are able to log in with just your username and password:

./svpn-login.py [user@host]

DNS and Routing

  • By default, the script will change your DNS servers to the ones provided by the VPN server. Skip this step by by passing the --skip-dns option.

  • By default, once connected, the script will route all traffic through the newly-created VPN network interface. Skip this step by passing the --skip-routes option (your VPN connection will be useless if this option is used, so only use it if you plan to set up the routing table yourself).

Other Info

[user@host] is saved for future invocations, so doesn't need to be specified on future invocations.

Use CTRL-C to exit.

The application will save [user@host] and last session ID in ~/.svpn-login.conf. If no user was given, [host] will still be saved. In case of problems or for reset the session data simply remove that file.

svpn-login's People

Contributors

bitkis avatar damianball avatar dnax avatar jyknight avatar marco-parillo avatar mattjamison avatar zrhoffman avatar

Stargazers

 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

svpn-login's Issues

Old session no longer valid, dynamic MRHSession?

Trying to provide sessionid as my organization uses 2FA. As suggested in the configuration instructions I found the cached MRHSession string after logging into the VPN server via browser and then used it for login via svpn. This is the output:

Getting params...
Old session no longer valid.
Unable to find the 'Network Access' entry in main menu. Do you have VPN access?

I went back to the VPN server url in my explorer and checked the sessionid again and it was different. It seems that I am assigned a different one every time I log in. Is this normal?

Support f5-vpn:// URIs

Hi, until now I'm using the Arch AUR f5vpn client, and my workflow was navigating to our companies F5 website (F5-DOMAIN), authenticating, and then the browser opens a URI like

f5-vpn://F5-DOMAIN?server=F5-DOMAIN&resourcename=/DEPARTMENT/DESCRIPTION&resourcetype=network_access&cmd=launch&protocol=https&port=443&sid=nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn&token=TOKEN

Using ~/.local/share/applications/defaults.list and ~/.local/share/applications/com.f5.f5vpn.desktop I have full control over what to do with this URL and could parse it and start any script/application that supports these parameters.

Is this workflow compatible with svpn-login ? If now, could it get implemented ?

setup_dns is never called

I was trying to patch svpn-login to include support for systemd-resolved, but realized that it actually no longer actually calls the platform-specific DNS setup code since 2203bc2. Is this by design? This script seems to be my best bet on getting the VPN connection working with proper DNS configuration since upgrading to Fedora 33.

SVPN logs

I'm trying to run your script in docker, but svpn doesn't write correctly in /etc/resolv.conf after connecting.

If I run it outside the container, it works perfectly.

Do you know a way for svpn to generate some kind of log?

Thanks for the script, it is helping a lot.

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.