Zusätzliche Client-Zertifikate erstellen gelingt nicht

Support forum for Easy-RSA certificate management suite.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
Lahnfisch
OpenVpn Newbie
Posts: 7
Joined: Mon May 10, 2021 10:26 pm

Zusätzliche Client-Zertifikate erstellen gelingt nicht

Post by Lahnfisch » Tue May 11, 2021 11:20 pm

Hallo,
ich bin neu hier und hoffe auf Erleuchtung....
Da mein Schulenglisch schon viele Jahre gealtert ist, hoffe ich außerdem noch auf deutschsprachige Hilfe.

Ich betreibe einige Photovoltaikanlagen an verschiedenen Orten. Die Datenübermittlung erfolgt per ftp-upload über Mobilfunk.
Um aktiv auf den Datenlogger zugreifen zu können, hat mir ein damaliger Bekannter vor einigen Jahren geholfen, einen ovpn-Server auf meinem Windows-PC zu installieren. An den PV-Standorten laufen GLI-Minirouter, die als clients fungieren. Ich hatte damals 5 client-Zertifikate erstellt, die problemlos laufen. Auch die Erneuerung des Heim-PCs hat das System verkraftet.
Nun hätte ich Bedarf an weiteren client-Zertifikaten, aber das Erstellen gelingt mir nicht.
Den Screenshot meines Versuches samt Fehlermeldung füge ich bei.
Image
C:\temp hatte ich damals als Verzeichnis gewählt, weil c:\program files\OpenVPN\* als schreibgeschützt abgelehnt wurde.
...und aus \temp habe ich mir nur das rauskopiert (die fertigen Zertifikate), was ich jeweils brauchte, ohne jemals das gesamte Verzeichnis zu sichern.
Dort standen wahrscheinlich die Variablen, die ich jetzt benötigte.
Bis jetzt habe ich mich nicht getraut, irgend einen anderen Befehl aus easy-rsa als "Build a private key/certficate for the openvpn server" auszuführen, da die anderen als "(once only)" gekennzeichnet sind. Ich habe Angst, dass die bereits erstellten Zertifikate nicht mehr funktionieren. Die sind räumlich gut verteilt und es würde einigen Aufwand bedeuten, sie auszutauschen.

Frage: Wie kann ich zusätzliche Zertifikate erzeugen, ohne die bestehenden zu deaktivieren? Geht das überhaupt?

Ich bin für jede Anleitung dankbar, die "laienlesbar" ist.
Ich freue mich auf eure Tipps oder Nachfragen.

Armin

Lahnfisch
OpenVpn Newbie
Posts: 7
Joined: Mon May 10, 2021 10:26 pm

Re: Zusätzliche Client-Zertifikate erstellen gelingt nicht

Post by Lahnfisch » Tue May 11, 2021 11:36 pm

Es hat wohl nicht geklappt, den Screenshot abzubilden. Deshalb hier:


c:\Program Files\OpenVPN\easy-rsa>vars

c:\Program Files\OpenVPN\easy-rsa>build-key PV_2
Generating a 4096 bit RSA private key
..............................++
........................................................................++
writing new private key to 'C:\temp\PV_2.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [DE]:
State or Province Name (full name) [RLP]:
Locality Name (eg, city) [Ehofen]:
Organization Name (eg, company) [OpenVPN]:
Organizational Unit Name (eg, section) [pvaf]:
Common Name (eg, your name or your server's hostname) [pvaf]:PV_2
Name [OpenVPN]:PV_2
Email Address [jaegermg3@web.de]:

Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
Using configuration from openssl-1.0.0.cnf
21096:error:02001002:system library:fopen:No such file or directory:crypto/bio/bss_file.c:74:fopen('C:\temp/index.txt','r')
21096:error:2006D080:BIO routines:BIO_new_file:no such file:crypto/bio/bss_file.c:81:
C:\temp\*.old konnte nicht gefunden werden

C:\Programme\OpenVPN\easy-rsa>


Armin

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Zusätzliche Client-Zertifikate erstellen gelingt nicht

Post by TinCanTech » Tue May 11, 2021 11:51 pm

Lahnfisch wrote:
Tue May 11, 2021 11:36 pm
21096:error:02001002:system library:fopen:No such file or directory:crypto/bio/bss_file.c:74:fopen('C:\temp/index.txt','r')
Keine übereinstimmende Datei oder Ordner


Danke: https://translate.google.co.uk/


Puede que le guste probar Easy-TLS:
https://github.com/TinCanTech/easy-tls

Lahnfisch
OpenVpn Newbie
Posts: 7
Joined: Mon May 10, 2021 10:26 pm

Re: Zusätzliche Client-Zertifikate erstellen gelingt nicht

Post by Lahnfisch » Wed May 12, 2021 9:52 am

Hallo TinCanTech,

danke für die schnelle Reaktion.
Im Verzeichnis C:\temp existiert tatsächlich keine Datei index.txt.
Wie kann ich die generieren?

Armin

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Zusätzliche Client-Zertifikate erstellen gelingt nicht

Post by TinCanTech » Wed May 12, 2021 6:52 pm


Lahnfisch
OpenVpn Newbie
Posts: 7
Joined: Mon May 10, 2021 10:26 pm

Re: Zusätzliche Client-Zertifikate erstellen gelingt nicht

Post by Lahnfisch » Thu May 13, 2021 7:17 pm

Hallo TinCanTech,

danke für den Tipp.
Leider konnte ich im genannten Forum auch keine Lösung für mein Problem finden.
Aber falls hier keine weiteren Antworten eingehen, muss ich meine Frage mal dort stellen.

Armin

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Zusätzliche Client-Zertifikate erstellen gelingt nicht

Post by TinCanTech » Thu May 13, 2021 8:01 pm

Uninstall the old version of openvpn which you are using.
Then install openvpn 2.5.2, which comes with Easy-RSA version 3.
Then start again with creating your PKI.

Read:
https://github.com/OpenVPN/easy-rsa/blo ... rs.example

Run:

Code: Select all

./easyrsa help

Lahnfisch
OpenVpn Newbie
Posts: 7
Joined: Mon May 10, 2021 10:26 pm

Re: Zusätzliche Client-Zertifikate erstellen gelingt nicht

Post by Lahnfisch » Fri May 14, 2021 8:49 am

Bleiben dabei meine vorhandenen Zertifikate gültig?

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Zusätzliche Client-Zertifikate erstellen gelingt nicht

Post by TinCanTech » Fri May 14, 2021 11:39 am

Is it even valid now ?

Lahnfisch
OpenVpn Newbie
Posts: 7
Joined: Mon May 10, 2021 10:26 pm

Re: Zusätzliche Client-Zertifikate erstellen gelingt nicht

Post by Lahnfisch » Sat May 15, 2021 7:06 pm

Yes, there are five certificates, which are working. And they are distributed in a wide distance.

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Zusätzliche Client-Zertifikate erstellen gelingt nicht

Post by TinCanTech » Sat May 15, 2021 7:36 pm

You can safely upgrade to Easy-RSA version 3 and OpenVPN Version 2.5 and your certificates will all still be valid.

You are a rare case in that you will be able to use the Easy-RSA 3 upgrade tool to upgrade your old Easy-RSA version 2 PKI to version 3. Please make a backup first, just in case.

Let me know if you have any difficulty with the upgrade because I wrote it and it is good to see it being used.

Lahnfisch
OpenVpn Newbie
Posts: 7
Joined: Mon May 10, 2021 10:26 pm

Re: Zusätzliche Client-Zertifikate erstellen gelingt nicht

Post by Lahnfisch » Mon Jun 14, 2021 10:57 pm

Hi TinCanTech,

thank you for your help.
I was so afraid to loose the function of my existing system, that I didn´t dare to act myself.
I found a personal helper, who created several certificates for me on his own pc.
They are working and I`m happy.

Armin

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Zusätzliche Client-Zertifikate erstellen gelingt nicht

Post by TinCanTech » Tue Jun 15, 2021 12:31 am

You could have paid me to do it all for you, risk free ....

But clearly, you found it more satisfying to let us all know that you found some local idiot to exploit instead.

I heartily hope that your new VPN is as secure as my grandmothers bowels :mrgreen:

Post Reply