Skip to content

Automatically connect to OpenConnect with TOTP (and retries)

Notifications You must be signed in to change notification settings

tommybrecher/vpn-otp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vpn-otp

Connect to openconnect VPNs which require OTP password automatically with automatic reconnection on disconnect.

Dependencies:

  • OpenConnect (for connecting to OpenConnect based VPNs)

Installation on macOS

Installing Brew requirments: brew install openconnect

Installing Python requirments: pipenv install

Configure:

A Prompt will appear when running this app for the first time, A configuration file will be generated in users home folder:

~/.pyotp/config

Usage:

pipenv run pyotp-vpn

It might be beneficial to make a patch which includes proprietary information for your organization.

Configuration arguments: args = Any configuration flags that would normally be passed to openconnect, for example --no-dtls or --protocol=pulse routes = a new-line seperated list of prefixes (routes) to be added by vpn-slice (Split-tunnel allowed networks) domains = a new-line seperated list of domain names we want to add a resolver for (DNS via VPN)

Example ~/.pyotp/config file

[pulse]
args = --protocol=pulse --no-dtls <--other-options--> <--vpn-url-->
routes =
        10.0.0.0/8
        172.16.0.0/12
        8.8.8.0/24

domains =
        domain1.com
        domain2.com
        domain3.com

About

Automatically connect to OpenConnect with TOTP (and retries)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages