https://github.com/zapthedingbat/openvpn-2fa
OpenVPN 2FA client command line launcher
https://github.com/zapthedingbat/openvpn-2fa
Last synced: over 1 year ago
JSON representation
OpenVPN 2FA client command line launcher
- Host: GitHub
- URL: https://github.com/zapthedingbat/openvpn-2fa
- Owner: zapthedingbat
- Created: 2019-05-22T09:32:25.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T08:47:51.000Z (over 2 years ago)
- Last Synced: 2025-03-18T03:02:26.129Z (over 1 year ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
CNI vpn client command line launcher
===
The tool starts the `openvpn` client and passes the authentication details. This
includes calculating the TOTP code and concatenating it with the password.
## Usage
Configuration values an either be set as environment variables or in the
.openvpn file in the home directory
Set the following variables:
- `OPENVPN_CONFIG_FILE` Path to a the OpenVPN configuration file to pass to the client
- `OPENVPN_USERNAME` Username used to authenticate with the VPN
- `OPENVPN_PASSWORD` Password used to authenticate with the VPN
- `OPENVPN_TOTP_SECRET` The secret used to generate the 2FA code that is
concatenated with the password.
### Example
```
OPENVPN_CONFIG_FILE=~/myconfig.ovpn
OPENVPN_USERNAME=user@example.com
OPENVPN_PASSWORD=mysecretpassword
OPENVPN_TOTP_SECRET=123456789abcdef
```
To start the vpn run `vpn` on the command line