Koozali.org: home of the SME Server

openvpn et pki

Offline trazomtg

  • ***
  • 119
  • +0/-0
openvpn et pki
« on: June 23, 2017, 02:47:28 PM »
Bonjour à tous.
dans la doc d'installation, OPENvpn fait installer PKI
étant donné que j'utilise un autre chiffrement pour SSH et Thunderbird, puis je utiliser ces clés à la place de PKI?

Merci
T

Offline trazomtg

  • ***
  • 119
  • +0/-0
Re: openvpn et pki
« Reply #1 on: June 24, 2017, 12:15:04 PM »
autre question:

je suis sous SMEserver 9.2
pour installer OPENVPN Routed, laquelle de ces 2 docs :

https://wiki.contribs.org/OpenVPN   et
https://wiki.contribs.org/OpenVPN_Routed

dois je utiliser?

merci

guest22

Re: openvpn et pki
« Reply #2 on: June 24, 2017, 09:48:07 PM »
It's clearly explained on both wiki pages. You have to decide how you want to put either of them into use.

And please 1 topic only per thread. Please open a new topic for each question.

Offline trazomtg

  • ***
  • 119
  • +0/-0
Re: openvpn et pki
« Reply #3 on: June 26, 2017, 12:31:16 AM »
j'aimerais, si c'est possible, ne pas installer PKI. Jr ptreferais utiliser des cles RSA que j'ai deja. Est ce possible

Bonjour,
j'aimerias ne pas installer PKI cat je possede deja des cles RSA. Est ce possible?
merci











Offline stephdl

  • *
  • 1,519
  • +0/-0
    • Linux et Geekeries
Re: openvpn et pki
« Reply #4 on: June 26, 2017, 08:05:02 AM »
https://wiki.contribs.org/OpenVPN  est une page obsolete, se referer a openvpn bridge, routed, site2site, des contribs de daniel.
Concernant phpki, je crois qu'openvpn bridge peut fonctionner sans, les certificat du serveur et racine doivent etre renseigné dans le panel....mais comme pour toutes customisations, il faut le background derriere pour parametrer.
« Last Edit: June 26, 2017, 08:08:40 AM by stephdl »
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline Daniel B.

  • *
  • 1,699
  • +0/-0
    • Firewall Services, la sécurité des réseaux
Re: openvpn et pki
« Reply #5 on: June 26, 2017, 09:05:30 AM »
j'aimerias ne pas installer PKI cat je possede deja des cles RSA. Est ce possible?
Il est tout à fait possible de se passer de PHPki, qui reste complètement indépendant d'OpenVPN. Tu peux utiliser une autre PKI, il faut par contre des certificats x509 (au format PEM)
C'est la fin du monde !!! :lol:

Offline trazomtg

  • ***
  • 119
  • +0/-0
Re: openvpn et pki
« Reply #6 on: July 01, 2017, 12:51:16 PM »
hello,

j'ai installé openvpn-bridge, ça s'est bien passé.
j'ai installé PKI, ça s'est bien passé.

j'ai créé un certificat à partir de "gestion des certificats"  de server-manager
quand je regarde : CERTIFICATE MANAGEMENT CONTROL PANEL je ne vois aucun certificat.

j'ai bien les fichiers :

./opt/phpki/phpki-store/CA/certs/cacert.pem
./opt/phpki/phpki-store/CA/private/takey.pem
./opt/phpki/phpki-store/CA/private/cakey.pem
./opt/phpki/phpki-store/CA/private/dhparam1024.pem
./opt/phpki/phpki-store/CA/crl/cacrl.pem

mais aucun certificat ne s'affiche
donc dans le panel de configuration de openvpn je ne peux renseigner les valeurs demandées

que faire?
merci
« Last Edit: July 01, 2017, 12:54:36 PM by trazomtg »

Offline Daniel B.

  • *
  • 1,699
  • +0/-0
    • Firewall Services, la sécurité des réseaux
Re: openvpn et pki
« Reply #7 on: July 01, 2017, 01:41:00 PM »
Une fois que tu as créé la CA, il faut créer les certificats (certificat serveur, côté serveur et client VPN pour les clients). Tout est détaillé sur la page https://wiki.contribs.org/OpenVPN_Bridge#Using_PHPki_to_manage_the_certificates
C'est la fin du monde !!! :lol:

Offline trazomtg

  • ***
  • 119
  • +0/-0
Re: openvpn et pki
« Reply #8 on: July 01, 2017, 02:28:13 PM »
c'est bien la doc que j'ai suivie

mais quand cette doc dit:

Server certificate: You should put here the certificate of the server. You can get it in PHPki, manage certificates, click on the download link corresponding to the certificate you have created for the server ("openvpn-bridge" in the example), choose PEM certificate in the drop-down menu, download it. You can open this file with a text editor. Copy and paste this text into the "Server certificate" window.

je n'ai pas de lien correspondant au certificat créé.
je n'ai pas de PEM certificate dans le menu


Offline Daniel B.

  • *
  • 1,699
  • +0/-0
    • Firewall Services, la sécurité des réseaux
Re: openvpn et pki
« Reply #9 on: July 01, 2017, 04:31:00 PM »
Il faudrait que tu postes une capture d'écran pour confirmer, mais à priori, tu n'as pas créé le certificat pour le serveur sur PHPki
C'est la fin du monde !!! :lol:

Offline trazomtg

  • ***
  • 119
  • +0/-0
Re: openvpn et pki
« Reply #10 on: July 01, 2017, 06:59:41 PM »
je n'arrive pas à inserer une image!!!
« Last Edit: July 01, 2017, 07:05:25 PM by trazomtg »

Offline trazomtg

  • ***
  • 119
  • +0/-0
Re: openvpn et pki
« Reply #11 on: July 01, 2017, 08:31:26 PM »
je ne sais pas ou trouver :

le certificat su serveur
la clé secrète associée au certificat

est ce dans les fichiers  /opt/phpki/phpki-store/CA ou /etc/pki ou ailleurs?

j'ai bien le certificat de root , de Diffie-Helman et la clé statique partagée

je ne sais même pas si c'est juste

Offline gieres

  • *
  • 213
  • +0/-0
Re: openvpn et pki
« Reply #12 on: July 01, 2017, 10:00:55 PM »
Bonsoir,

Tout est là : https://wiki.contribs.org/OpenVPN_Bridge/fr#Certificat_du_serveur

Qu'est-ce qui n'est pas clair ?

Bonne soirée.

Offline trazomtg

  • ***
  • 119
  • +0/-0
Re: openvpn et pki
« Reply #13 on: July 01, 2017, 11:56:01 PM »
J'recréé un certificat en renseignants les zpnes de cette manièe:

 Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number: 1048577 (0x100001)
    Signature Algorithm: sha1WithRSAEncryption
        Issuer: C=fr, ST=Sud Ouest, L=Toulouse, O=trazom, OU=Certificate Authority, CN=PHPki Certificate Authority/emailAddress=trazom.informatique@free.fr
        Validity
            Not Before: Jul  1 21:49:12 2017 GMT
            Not After : Jul  2 21:49:12 2019 GMT
        Subject: C=fr, ST=Sud Ouest, L=grenoble, O=ens, O=21232f297a57a5a743894a0e4a801fc3, OU=phy, CN=thierry/emailAddress=trazom.informatique@free.fr
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                Public-Key: (2048 bit)
                Modulus:
                    00:d4:49:5f:d2:43:8d:ef:e2:43:f2:3f:8a:10:c9:
                    e9:7c:74:27:91:29:c7:82:c8:d9:1d:80:83:4f:ad:
                    9d:a1:f9:99:c3:6e:7c:fc:8e:3f:cb:21:91:a8:af:
                    fb:3a:8e:a3:18:e3:25:ce:87:5b:8e:1a:49:d7:9d:
                    99:b2:ff:c5:34:66:32:0d:15:20:6a:b0:e8:71:10:
                    a8:64:96:6f:25:bf:12:0b:f3:39:bc:d0:c3:2e:f7:
                    b4:04:3d:0a:07:51:6a:fc:0e:7a:93:44:37:6c:86:
                    85:82:3b:47:9b:39:cf:04:2e:34:22:b3:7b:d9:61:
                    8b:eb:c5:55:4a:4c:2f:58:e9:f1:64:03:a6:48:b5:
                    c7:b8:c5:e5:bb:eb:ee:01:39:f1:56:25:c8:a2:c9:
                    c2:3c:83:d2:e8:28:c1:43:3b:ac:00:e0:2e:e6:85:
                    87:37:2d:b3:ca:c0:38:0f:19:9a:76:f2:ed:76:bc:
                    38:cb:b1:cd:5a:49:45:06:97:12:83:dc:8a:09:e5:
                    38:fa:94:b9:d7:4e:db:3a:3d:d6:30:35:c3:9c:fe:
                    f4:b7:ee:d3:be:b9:57:81:37:1a:96:d2:0a:89:96:
                    f2:43:a2:c2:fe:b9:05:3e:7f:2c:af:6a:4e:d2:e7:
                    b3:04:e7:fd:7c:3e:69:59:6a:48:d0:69:b2:63:8a:
                    28:69
                Exponent: 65537 (0x10001)
        X509v3 extensions:
            X509v3 Basic Constraints: critical
                CA:FALSE
            X509v3 Key Usage: critical
                Digital Signature, Non Repudiation, Key Encipherment
            X509v3 Extended Key Usage: critical
                E-mail Protection, TLS Web Client Authentication
            Netscape Cert Type: critical
                SSL Client, S/MIME
            X509v3 Subject Key Identifier:
                B1:ED:BC:C8:DF:92:BF:86:25:4A:8C:81:3C:69:E0:F5:11:2F:54:D8
            X509v3 Authority Key Identifier:
                keyid:9D:F7:68:86:3C:A1:84:B7:B7:6B:A1:7F:D4:77:B1:B7:63:54:75:5B
                DirName:/C=fr/ST=Sud Ouest/L=Toulouse/O=trazom/OU=Certificate Authority/CN=PHPki Certificate Authority/emailAddress=trazom.informatique@free.fr
                serial:A5:44:F6:B9:12:0A:F6:56

            X509v3 Subject Alternative Name:
                email:trazom.informatique@free.fr
            X509v3 Issuer Alternative Name:
                email:trazom.informatique@free.fr
            X509v3 CRL Distribution Points:

                Full Name:
                  URI:https://trazom.thierry/phpki/index.php?stage=dl_crl

            Netscape Comment:
                PHPki/OpenSSL Generated Personal Certificate
            Netscape Base Url:
                https://trazom.thierry/phpki/
            Netscape Revocation Url:
                ns_revoke_query.php?
            Netscape CA Policy Url:
                https://trazom.thierry/phpki/policy.html
    Signature Algorithm: sha1WithRSAEncryption
         27:25:fc:f7:97:18:02:bc:f3:20:5b:e7:e8:66:58:cc:20:e4:
         fd:7b:01:1c:15:b6:7c:c4:66:fc:7d:97:45:40:4d:48:11:4c:
         81:29:ce:c9:13:0c:4f:9d:b1:73:e1:6e:56:9b:4e:22:48:a2:
         14:70:22:11:98:41:5f:8b:60:16:de:c9:d2:70:38:08:12:e8:
         ec:ab:77:79:f3:00:54:22:b2:43:74:04:80:fb:ea:76:1b:13:
         7d:35:ac:55:27:d9:fa:29:54:80:16:d3:85:a9:1f:63:c8:5b:
         a2:f2:38:bb:96:3d:83:9a:1d:7b:6a:65:94:a7:45:c8:de:e0:
         4c:35:70:41:51:f5:c8:c8:87:db:9f:fb:66:37:9b:46:f4:41:
         0e:57:54:e0:df:a1:8d:c0:85:80:41:4a:70:2a:3f:ef:6e:de:
         ce:6d:18:a7:a2:79:96:2d:fd:4a:b6:ab:e9:6a:44:2c:6e:f1:
         5d:b6:a7:cc:de:5c:ce:27:d9:14:45:a3:0a:31:75:4c:3d:2b:
         3c:2e:5b:2a:86:d2:52:d6:b4:b7:f8:5e:13:33:9f:b0:59:88:
         1d:a6:74:eb:64:5b:26:50:ed:28:2b:7e:ed:b5:53:fa:2e:4b:
         f6:e8:d3:3e:31:2c:80:09:d2:77:a8:34:a2:6e:40:a0:31:8c:
         e4:11:9e:7c
Certificate purposes:
SSL client : Yes
SSL client CA : No
SSL server : No
SSL server CA : No
Netscape SSL server : No
Netscape SSL server CA : No
S/MIME signing : Yes
S/MIME signing CA : No
S/MIME encryption : Yes
S/MIME encryption CA : No
CRL signing : No
CRL signing CA : No
Any Purpose : Yes
Any Purpose CA : Yes
OCSP helper : Yes
OCSP helper CA : No
Time Stamp signing : No
Time Stamp signing CA : No
-----BEGIN CERTIFICATE-----
MIIGuDCCBaCgAwIBAgIDEAABMA0GCSqGSIb3DQEBBQUAMIG3MQswCQYDVQQGEwJm
cjESMBAGA1UECBMJU3VkIE91ZXN0MREwDwYDVQQHEwhUb3Vsb3VzZTEPMA0GA1UE
ChMGdHJhem9tMR4wHAYDVQQLExVDZXJ0aWZpY2F0ZSBBdXRob3JpdHkxJDAiBgNV
BAMTG1BIUGtpIENlcnRpZmljYXRlIEF1dGhvcml0eTEqMCgGCSqGSIb3DQEJARYb
dHJhem9tLmluZm9ybWF0aXF1ZUBmcmVlLmZyMB4XDTE3MDcwMTIxNDkxMloXDTE5
MDcwMjIxNDkxMlowgbkxCzAJBgNVBAYTAmZyMRIwEAYDVQQIEwlTdWQgT3Vlc3Qx
ETAPBgNVBAcTCGdyZW5vYmxlMQwwCgYDVQQKEwNlbnMxKTAnBgNVBAoTIDIxMjMy
ZjI5N2E1N2E1YTc0Mzg5NGEwZTRhODAxZmMzMQwwCgYDVQQLEwNwaHkxEDAOBgNV
BAMTB3RoaWVycnkxKjAoBgkqhkiG9w0BCQEWG3RyYXpvbS5pbmZvcm1hdGlxdWVA
ZnJlZS5mcjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANRJX9JDje/i
Q/I/ihDJ6Xx0J5Epx4LI2R2Ag0+tnaH5mcNufPyOP8shkaiv+zqOoxjjJc6HW44a
SdedmbL/xTRmMg0VIGqw6HEQqGSWbyW/EgvzObzQwy73tAQ9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glghkgBhvhCAQMEFhYUbnNfcmV2b2tlX3F1ZXJ5LnBocD8w
NwYJYIZIAYb4QgEIBCoWKGh0dHBzOi8vdHJhem9tLnRoaWVycnkvcGhwa2kvcG9s
aWN5Lmh0bWwwDQYJKoZIhvcNAQEFBQADggEBACcl/PeXGAK88yBb5+hmWMwg5P17
ARwVtnzEZvx9l0VATUgRTIEpzskTDE+dsXPhblabTiJIohRwIhGYQV+LYBbeydJw
OAgS6Oyrd3nzAFQiskN0BID76nYbE301rFUn2fopVIAW04WpH2PIW6LyOLuWPYOa
HXtqZZSnRcje4Ew1cEFR9cjIh9uf+2Y3m0b0QQ5XVODfoY3AhYBBSnAqP+9u3s5t
GKeieZYt/Uq2q+lqRCxu8V22p8zeXM4n2RRFowoxdUw9KzwuWyqG0lLWtLf4XhMz
n7BZiB2mdOtkWyZQ7Sgrfu21U/ouS/bo0z4xLIAJ0neoNKJuQKAxjOQRnnw=
-----END CERTIFICATE-----
 
qu'est ce que j'en fait?


Offline Daniel B.

  • *
  • 1,699
  • +0/-0
    • Firewall Services, la sécurité des réseaux
Re: openvpn et pki
« Reply #14 on: July 02, 2017, 10:36:53 AM »
C'est la fin du monde !!! :lol: