web-dev-qa-db-fra.com

Nouveau certificat pour le VPN de l'entreprise, maintenant openconnect ne fonctionne plus

Donc, grâce à une "mise à niveau" au travail, nous avons obtenu un nouveau certificat VPN. Il est auto-signé et ne fonctionne plus. Voici le syslog:

openconnect[6002]: Connected to xxx:443
openconnect[6002]: SSL negotiation with xxx
openconnect[6002]: Server certificate verify failed: signer not found
openconnect[6002]: Connected to HTTPS on xxx
openconnect[6002]: Got CONNECT response: HTTP/1.1 200 OK
openconnect[6002]: CSTP connected. DPD 300, Keepalive 30
NetworkManager[1273]: Set up DTLS failed; using SSL instead
openconnect[6002]: Connected as 192.168.0.160, using SSL
openconnect[6002]: SIOCSIFMTU: Operation not permitted
NetworkManager[1273]: <info>  [1537565026.6078] vpn-connection[0x55ab83c186c0,a0614dc2-f483-4dc9-87d4-7b9ac4169d31,"company",0]: VPN connection: (IP Config Get) reply received.
NetworkManager[1273]: <info>  [1537565026.6106] vpn-connection[0x55ab83c186c0,a0614dc2-f483-4dc9-87d4-7b9ac4169d31,"company",7:(vpn0)]: VPN connection: (IP4 Config Get) reply received
NetworkManager[1273]: <warn>  [1537565026.6107] vpn-connection[0x55ab83c186c0,a0614dc2-f483-4dc9-87d4-7b9ac4169d31,"company",7:(vpn0)]: invalid IP4 config received!
NetworkManager[1273]: <warn>  [1537565026.6107] vpn-connection[0x55ab83c186c0,a0614dc2-f483-4dc9-87d4-7b9ac4169d31,"company",7:(vpn0)]: VPN connection: did not receive valid IP config information
NetworkManager[1273]: <info>  [1537565026.6129] vpn-connection[0x55ab83c186c0,a0614dc2-f483-4dc9-87d4-7b9ac4169d31,"company",0]: VPN plugin: state changed: started (4)
NetworkManager[1273]: <info>  [1537565026.6133] vpn-connection[0x55ab83c186c0,a0614dc2-f483-4dc9-87d4-7b9ac4169d31,"company",0]: VPN plugin: state changed: stopping (5)
NetworkManager[1273]: <info>  [1537565026.6134] vpn-connection[0x55ab83c186c0,a0614dc2-f483-4dc9-87d4-7b9ac4169d31,"company",0]: VPN plugin: state changed: stopped (6)

Je vois que le signataire n’a pas trouvé d’erreur, mais il passe ensuite à "Config IP4 invalide reçue!" que se passe-t-il ici et comment puis-je résoudre ce problème?

Ou mieux encore, dites openconnect de faire confiance à un cert auto-signé.

1
mmaceachran

Il existe une solution de contournement pour utiliser l'option --servercert lors de la connexion:

dans le terminal entrer

Sudo openconnect --protocol=gp <hostaddress>

et recevez le message:

Certificate from VPN server "serverhost" failed verification. 
Reason:   signer not found To trust this server in future, perhaps
add this to your command line: --servercert pin-sha256:serverfingerprint 
Enter 'sì' to accept, 'no' to abort; anything else to view: 

et enfin utiliser l'empreinte digitale dans votre ligne de commande:

openconnect --servercert=sha1:26cfbcdefg... [usual arguments] 

ou

openconnect --servercert=sha256:a8cfbcdedeadbeefdeadbeeffg... [usual arguments]

Source https://github.com/dlenski/openconnect/issues/6

1
kukulo