This project allow Linux machines connect to VPN using openconnect with SAML authentication from G Suite.
- python3
- openconnect
- chromedriver
Please do not use higher version of openconnect then 8.05 Add this line into the file /etc/dnf/dnf.conf
excludepkgs=openconnect-8.10
Now you can install openconnect
sudo dnf install openconnect
apt-get install openconnect
First we have to install all dependence in Python3
pip3 install --user -r requirements.txt
Download latest version of chromedriver
https://chromedriver.chromium.org/downloads
Creating cache directory (this value should be set in gp-gsuite.conf)
mkdir ~/.azimo.gp
Please edit file gp-gsuite.conf
and change settings:
vpn_url
if address change, by defaulthttps://vpn.azimo.com
username
your gmail account, ex.[email protected]
password
leave empty, I don't want know your passwordgateway
not used at this moment, by defaultManual vpn.azimo.com
webdriver
path to binnarychromedrive
(at this moment we are using chromedrive in version 73)webdriver_dir
where all cookies should be saved, by default~/.azimo.gp
openconnect_cmd
if you don't have to use root privillages can be emptyprelogin_cookie
if you already knowprelogin_cookie
you can skip cookie generationopenconnect_args
extra parameters for openconnectexecute
1 or true to execute, 0 for debug onlydebug
1 or true for debug variablesbug.nl
1 or true, newline work-around for openconnectbug.username
1 or true, username work-around for openconnect
It's verrryyyyyy easy :)
./gp-gsuite.py <conf>
Example:
./gp-gsuite.py gp-gsuite.conf
- chromedrive cache (java kur12)
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=73.0.3683.68 (47787ec04b6e38e22703e856e101e840b65afe72),platform=Linux 5.0.5-200.fc29.x86_64 x86_64)
Solution:
rm -rf /tmp/.com.google.Chrome*