Konfiguration af Viscosity-klient 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.

Forudsætninger

I denne vejledning skal du have en OpenVPN-fjernserver installeret og konfigureret til klienter. I dette dokument har vi brugt OpenVPN 2.49 installeret 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 skal også bruge følgende:

  • 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.

Anvendelse

  1. Start Viscosity og opret en ny forbindelse »openVPN« (du kan navngive den som du vil)

  2. Højreklik på forbindelsen, og klik på Rediger

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

  4. Under godkendelse skal du i Type scrolle ned til SSL/TLS Client (PKCS11).

  5. Vælg CA-filen til din forbindelse

    Valgfrit: Vælg ta.key i afsnittet TLS-Auth.

    img3
  6. Klik på knappen Tilføj ved siden af feltet Providers, og vælg PKCS#11-modulet til din Nitrokey. Der kan angives flere udbydere, og vi vil f.eks. bruge 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ælg en hentningsmetode fra rullemenuen Hentning

    img4
    • Hvis der kun skal bruges én Nitrokey på denne computer, skal du vælge Use certificate name below. Hvis Nitrokey’en i øjeblikket er tilsluttet computeren, skal du klikke på knappen Detect for Viscosity for automatisk at udfylde feltet Navn. Ellers kan dette felt udfyldes manuelt.

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

    Hvis Prompt for certificate name blev valgt, vil Viscosity automatisk registrere den nødvendige nøgle på Nitrokey ved hjælp af det/de angivne PKCS#11-modul(er). Vælg fra en af de fundne enheder, eller indtast navnet på den serialized id, der skal bruges manuelt. Igen skal brugeren om nødvendigt anmodes om en adgangskode/PIN.

  8. Klik på knappen Gem, og opret forbindelse fra din hovedgrænseflade

Referencer

Noter

  • Viscosity er ikke gratis, og du kan derfor støde på problemer ved at bruge den gratis version.

  • Vi overvejer at bruge Pritunl som et gratis og åbent alternativ.