Some F5 installations that work with the f5fpc client require an authorisation flow that is not part of the openconnect f5 client. This script takes care of that first phase and then pass on control to openconnect.
usage: firepass.py [-h] -s SERVER [-u USERNAME] [-p PASSWORD]
options:
-h, --help show this help message and exit
-s SERVER, --server SERVER
F5 server (e.g. https://vpn.f5.com)
-u USERNAME, --username USERNAME
Username (will prompt if unspecified)
-p PASSWORD, --password PASSWORD
Password (will prompt if unspecified)
The script outputs a MRHSession="deadc0deaddface0ff1cef00ddefaced" cookie that can be passed to the stdin of openconnect with --cookie-on-stdin, i.e.:
python3 firepass.py --server f5.example.com --username johndoe --password s3cr3t | openconnect --protocol=f5 f5.example.com --cookie-on-stdin.
Note that openconnect requires root priveliges to setup routes etc., so you might want to run it with sudo.