This utility allows you to authenticate using SAML and 2FA and then connect to your using openconnect at the command line on Linux.
- Docker (Download Page)
- OpenConnect (please use your package manager to install this)
git clone [email protected]:libcthorne/samlwebcookie.git
cd samlwebcookie
docker build -t samlwebcookie .
SAML_HOST=saml.host.my.company
FS_AUTH_HOST=auth.host.my.company
VPN_HOST=the.vpn.my.company
[email protected]
The connect.sh
script will first as you for your VPN password, then your 2FA verification code, and finally it will ask you to sudo - do not be alarmed when it prompts you for these.
Once connected, the openconnect
command will remain running.
./connect.sh
You should see output similar to:
Please enter your VPN password:
Running samlwebcookie
Waiting for 2FA code prompt...
Verification code: 999999
Got VPN cookie:
AAAAAAABBABABABAB@@AAAEXAMPLECOOKLIEPLEASEIGNORETHIOSVALYEHERE
Attempting to connect to server 111.111.111.11:443
Connected to 111.111.111.11:443
...
To disconnect from the VPN, simply hit Ctrl+C to terminate the connect.sh script.