Article original Publié le : 15 septembre 2021 Mise a jour le : |
Installer le paquet openfortivpn disponible dans le repo
1 |
$ sudo apt install openfortivpn |
Pour la conf en dur
1 |
$ sudo vim /etc/openfortivpn/config |
1 2 3 4 5 6 |
# ### config file for openfortivpn, see man openfortivpn(1) ### # host = vpn.example.org port = 443 username = vpnuser password = VPNpassw0rd |
Si au lancement il génère une erreur de certificat, récupérer le sérial affiché sous le sha256 digest et le truster dans la conf
1 |
ERROR: Gateway certificate validation failed, and the certificate digest in not in the local whitelist. If you trust it, rerun with: |
1 2 |
ERROR: sha256 digest: ERROR: 2b213ac31f146ffbb0528dbd5b0c8673458e72215a180462f220ab7449887231 |
1 |
$ sudo vim /etc/openfortivpn/config |
1 2 3 4 5 6 7 |
# ### config file for openfortivpn, see man openfortivpn(1) ### # host = vpn.example.org port = 443 username = vpnuser password = VPNpassw0rd trusted-cert = 2b213ac31f146ffbb0528dbd5b0c8673458e72215a180462f220ab7449887231 |
Execution du client
1 |
$ sudo openfortivpn & |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
INFO: Connected to gateway. INFO: Authenticated. INFO: Remote gateway has allocated a VPN. Using interface ppp1 Connect: ppp1 <--> /dev/pts/4 INFO: Got addresses: [1xx.xx.xx.xx], ns [xx.xx.xx.xx, xx.xx.xx.xx] INFO: negotiation complete INFO: negotiation complete local IP address xx.xx.xx.xx remote IP address xx.xx.xx.xx INFO: Interface ppp1 is UP. INFO: Setting new routes... INFO: Adding VPN nameservers... INFO: Tunnel is up and running. |
On peut aussi lancer le client tout en cli avec ou sans le mdp au lancement (ou dans le fichier de conf!)
1 |
$ sudo openfortivpn vpn.example.org:port -u username -p password |
1 |
$ sudo openfortivpn vpn.example.org:port -u username |