Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - thegundalf

#1
Hi Fabian,

thank you for your feedback! I will play around with your method and update the script.
Please correct me if i'm wrong:
I grab the config.xml and parse it, reading the path /opnsense/OPNsense/AcmeClient/certificates
and find the entry by /opnsense/OPNsense/AcmeClient/certificates/certificate/name to get the certRefId.
The certRefId is used in the path /opnsense/cert to get the crt and the prv values and also the caref as CertRefId for the CA certificate.

Afterwards convert and combine the crt-values and tadaa, complete cer-file for further conversions.

Best regards,

Max
#2
Hi everybody,

based on the thread https://forum.opnsense.org/index.php?topic=8865 i've written a PowerShell script which downloads and converts the given domain certificate for you.
It has the following dependencies:
The script needs the following mandatory parameters:

  • -CertificateDomain YOURDOMAIN
  • -Router IPORHOSTNAMEOFOPNSENSE
  • -SCPUsername YOURUSER (Default value is root)
  • -SCPPassword YOURPASSWORD
  • -Port YOURSSHPORT (Default value is 22)
  • -Keyfile PATHTOYOURSSHKEYFILE
  • -CertificatePassword CERTPASSWORD (password set for the pfx certificate
  • -Out FILENAMEOFCERTIFICATE (Default value is the given domain
  • -Path YOURPATH (if not set, outputs the certificate in the current folder
Example usage:
Sync-Cert -CertificateDomain tld.contoso.com -Router 192.168.0.1 -SCPUsername root -SCPPassword opnsense -CertificatePassword opnsense
This will connect to the opnSense firewall at 192.168.0.1 with the username root and the password opnsense.
After the connection it will tr the fullchain.cer and the tld.contoso.com.key files from the directory /var/etc/acme-client/home/tld.contoso.com/ directory and convert them using OpenSSL into the PKCS12 format, protecting the certificate with the password opnsense and saving it as tld.contoso.com.pfx in the current directory.

The script is available as gist at https://gist.github.com/Maahaax/0c1a69ffa7e3478c5992f20ae0a194e0

Best regards and thank you so much for this great piece of software named opnSense!

Max
#3
Hallo zusammen,

ich grabe das Thema nochmal aus, weil mir gestern die Lösung vor die Nase gefallen ist:

Beim VPN-Client Export gibt es die Möglichkeit, das Zertifikat mit einem Kennwort zu schützen, hier kann also einfach das gewünschte Kennwort angegeben werden und beim Laden als Archiv ist die .p12-Datei mit dem gewünschten Kennwort geschützt.

Viele Grüße und immer wieder tausend Dank für eure tolle Arbeit!
#4
Hallo JeGr,

es gibt leider VPN-Clients die, warum auch immer, Probleme damit haben, wenn bei den verwendeten Zertifikaten kein Kennwort gesetzt ist. Bei mir z.B. der NCP IPsec-Client. Gebe ich hier ein Zertifikat an, wird konsequent nach dem vergebenen Kennwort gefragt, auch wenn im Zertifkat kein Kennwort hinterlegt ist. Die Lösung war dann der Umweg über den Benutzer-Zertifikatsspeicher im Windows.
#5
Hallo zusammen,

ich muss das Thema leider nochmal ausgraben, da ich genau das gleiche Problem wie hilfi2000 habe.
Habe es nun sowohl mit Nutzerzertifikaten als auch mit Serverzertifikaten probiert. Nach dem Klick auf Export CA+User Cert+User Key in .p12-Format wird mir die Datei sofort zum Speichern angeboten. Gibt es vielleicht einen speziellen Menüpunkt zum Exportieren der Zertifikate? (Bin in der Übersicht System->Trust->Certificates)

Viele Grüße

Max
#6
17.1 Legacy Series / Re: OpenVPN
February 10, 2017, 08:37:26 AM
Works like a charm, thank you very much!
#7
17.1 Legacy Series / Re: OpenVPN
February 09, 2017, 09:18:48 AM
I can totally second the problem with the CRL. As soon as it is defined in the server configuration, it is not possible to connect anymore due to the failing TLS handshake.

Greetings

Max