Konfiguration av Viscosity-klienten med OpenVPN

Compatible Nitrokeys

3A/C/Mini

Passkey

HSM 2

Pro 2

FIDO2

Storage 2

Start

U2F

active

inactive

inactive

active

inactive

active

active

inactive

This guide will show to configure Viscosity client to connect to an OpenVPN instance, using a Nitrokey Pro 2 (or Nitrokey Storage 2), and PKCS#11 authentication.

Förutsättningar

För den här guiden behöver du en OpenVPN-fjärrserver installerad och konfigurerad för klienter. I det här dokumentet har vi använt OpenVPN 2.49 installerat på en Debian 10-server.

To read about how to configure OpenVPN to authenticate with Nitrokey Pro, you might consult the following documentation, as we will just cover the way to configure the Viscosity client in this guide.

Du behöver också följande:

  • En Nitrokey Pro 2 eller Nitrokey Storage 2

  • Client’s private key client.key loaded on the Nitrokey

  • Client’s certificate client.crt loaded on the Nitrokey

  • The Certificate Authority file, i.e. CA.crt file used for your OpenVPN setup

  • Optional: The shared secret key file, i.e. ta.key

For more information on PKCS#11 key management with OpenVPN, please consult OpenVPN’s documentation.

Användning

  1. Starta Viscosity och skapa en ny anslutning ”openVPN” (du kan kalla den som du vill).

  2. Högerklicka på anslutningen och klicka på redigera

  3. Add your server’s IP address and configure the port according to your configuration.

  4. Under autentisering, i Type rulla ner till SSL/TLS Client (PKCS11).

  5. Välj CA-filen för din anslutning

    Valfritt: Välj ta.key i avsnittet TLS-Auth.

    img3
  6. Klicka på knappen Lägg till bredvid fältet Providers och välj PKCS#11-modulen för din Nitrokey. Flera leverantörer kan anges och vi kommer till exempel att använda OpenSC.

    On macOS, the most common location for modules to be found is in the /usr/lib directory. Please refer to the documentation included with your driver software for the location to use. OpenSC’s module can be found at /Library/OpenSC/lib/opensc-pkcs11.so

    On Windows, the most common location for libraries is either in C:\Program Files or C:\Windows\System32. OpenSC libraries are generally located at C:\Program Files\OpenSC Project\OpenSC\pkcs11. There may be more than one library available here, you can try each one or simply add both.

  7. Välj en hämtningsmetod från rullgardinsmenyn Hämtning.

    img4
    • Om endast en Nitrokey ska användas på den här datorn väljer du Use certificate name below. Om Nitrokey för närvarande är ansluten till datorn klickar du på knappen Detect för att Viscosity automatiskt ska fylla i fältet Namn. Annars kan fältet fyllas i manuellt.

    • If in doubt, or if more than one Nitrokey may be used (i.e. multiple users), then select Prompt for certificate name.

    Om Prompt for certificate name har valts kommer Viscosity automatiskt att upptäcka den nödvändiga nyckeln på Nitrokey med hjälp av den/de angivna PKCS#11-modulen/erna. Välj bland de hittade enheterna eller ange namnet på den serialized id som ska användas manuellt. Återigen bör användaren uppmanas att ange ett lösenord/PIN om så krävs.

  8. Klicka på knappen Spara och anslut från huvudgränssnittet.

Referenser

Anteckningar

  • Viscosity är inte gratis och därför kan du stöta på problem när du använder gratisversionen.

  • Vi överväger att använda Pritunl som ett fritt och öppet alternativ.