apt-get install openfortivpn
Crear fichero de configuracion /etc/openfortivpn/config
# config file for openfortivpn, see man openfortivpn(1) host = hostquesea.tld port =443 username = usuario password = clave persistent = 30
openfortivpn -c /etc/openfortivpn/config ERROR: Gateway certificate validation failed, and the certificate digest in not in the local whitelist. If you trust it, rerun with: ERROR: --trusted-cert aaaaaabbbbbcccccccdddddeeeeffffaaaaaa0000111122233334445556a7bcd ERROR: or add this line to your config file: ERROR: trusted-cert = aaaaaabbbbbcccccccdddddeeeeffffaaaaaa0000111122233334445556a7bcd ERROR: Gateway certificate: ERROR: subject: ERROR: O=Fortinet Ltd. ERROR: CN=FortiGate ERROR: issuer: ERROR: O=Fortinet Ltd. ERROR: CN=FortiGate ERROR: sha256 digest: ERROR: aaaaaabbbbbcccccccdddddeeeeffffaaaaaa0000111122233334445556a7bcd INFO: Closed connection to gateway. ERROR: Gateway certificate validation failed, and the certificate digest in not in the local whitelist. If you trust it, rerun with: ERROR: --trusted-cert aaaaaaabbbbbcccccccdddddeeeeffffaaaaaa0000111122233334445556a7bcd ERROR: or add this line to your config file: ERROR: trusted-cert = aaaaaabbbbbcccccccdddddeeeeffffaaaaaa0000111122233334445556a7bcd ERROR: Gateway certificate: ERROR: subject: ERROR: O=Fortinet Ltd. ERROR: CN=FortiGate ERROR: issuer: ERROR: O=Fortinet Ltd. ERROR: CN=FortiGate ERROR: sha256 digest: ERROR: aaaaaabbbbbcccccccdddddeeeeffffaaaaaa0000111122233334445556a7bcd INFO: Could not log out.
# config file for openfortivpn, see man openfortivpn(1) host = hostquesea.tld port =443 username = usuario password = clave persistent = 30
trusted-cert = aaaaaabbbbbcccccccdddddeeeeffffaaaaaa0000111122233334445556a7bcd
cat openfortivpn.service [Unit] Description=Cliente OpenForti VPN Wants=network-online.target After=network.target [Service] Type=simple Environment=EMAIL_ADDR=root ExecStart=/usr/bin/openfortivpn -c /etc/openfortivpn/config User=root Group=root StandardInput=tty StandardOutput=tty TTYPath=/dev/tty7 [Install] WantedBy=multi-user.target
systemctl daemon-reload systemctl enable openfortivpn systemctl start openfortivpn
