brew install openfortivpnsudo apt-get install openfortivpnCreate a file in ~/.config/openfortivpn/config and paste below, but change values accordingly. If you don't have trusted-cert value, read below section.
host = vpn.xxx.co.in
port = 443
username = <username>
password = <password>
trusted-cert = <trusted_cert>
persistent = 30> sudo openfortivpn -c ~/.config/openfortivpn/configVery first time when you run the sudo openfortivpn -c ~/.config/openfortivpn/config it will print certificate value, below output is from my first run
.venv ❯ sudo openfortivpn vpn.xxxxx.co.in:443 -u xxxx 1
VPN account password:
ERROR: Gateway certificate validation failed, and the certificate digest is not in the local whitelist. If you trust it, rerun with:
ERROR: --trusted-cert 5e761a6181bf4ab5cff607335dc22b476d090274b34369d1a42a542eab158864
ERROR: or add this line to your configuration file:
**>>>>>>>>> ERROR: trusted-cert = 5e761a6181bf4ab5cff607335dc22b476d090274b34369d1a42a542eab158864**
ERROR: Gateway certificate:
ERROR: subject:
ERROR: C=US
ERROR: ST=California
ERROR: L=Sunnyvale
ERROR: O=xxx
ERROR: OU=FortiGate
ERROR: CN=vpn.xxx.co.in
ERROR: emailAddress=xxx@xxx.comHighlighted line above shows trusted-cert value that you can copy paste in config file