VPN Installation and Configuration of OpenVPN (Windows 10/11)

To use OpenVPN, all of the following conditions must be met:

  • Granted Access to Use VPN: Ensure you have been granted the necessary permissions to access the VPN. (Details can be found [here]).

  • Installed and Configured OpenVPN Application: The OpenVPN client must be properly installed and configured on your device.

  • Valid Certificate in OpenVPN Configuration: A valid certificate must be included in the OpenVPN configuration files to establish a secure connection.

  • OpenVPN Application Running and Connection Established: The OpenVPN application must be running, and a VPN connection must be successfully established.

OpenVPN uses a personal user certificate, which expires after 365 days. After this period, a new personal certificate must be generated. For detailed instructions, please refer to the help page.

If the password for MojaPG is changed after generating the personal certificate but before the 365-day period expires, the login to the certificate will still require the password that was used on the day the personal certificate was downloaded.

Installation and Configuration of OpenVPN on Windows 10 and Windows 11

  1. Download the installer for your system version: Windows 64-bit / Windows 32-bit / Windows ARM64 (if you're unsure which file to download, start with the first one - 64-bit).

  2. Download the configuration file for employees / students (select the correct file). If you are both an employee and a student, default to using the file for employees.

  3. Download the PG root certificate: pg-ca.pem

  4. Go to the personal certificate generator (you will need to log in with your Moja PG credentials

  5. If you are both an employee and a student, after logging in, you will see an option to select the type of certificate to generate (employee certificate or student certificate). Choose according to the file you previously downloaded in step 2 of this instruction. By default, the correct choice will be the employee certificate.

  6. Enter your password (the same one used for the Moja PG portal), generate the certificate, and then download it.

  7. Locate the downloaded personal certificate file certyfikat_uzytkownika.p12 on your computer's disk (unless configured otherwise, browsers typically save downloaded files in the "Downloads" folder).

Downloaded files can be easily located using the browser's download history. The location of the history is shown below using Mozilla Firefox and Chrome as examples.

After clicking on the "Downloads" option, a list of downloaded files will be displayed. Depending on your browser, each row with a downloaded file will have an option such as "Show in Folder," or an icon like a folder or three dots, etc., that allows you to view the downloaded file in its specific directory.

  1. Double-click the downloaded file named certyfikat_uzytkownika.p12 to open the Certificate Import Wizard. Leaving all default options selected, click Next → Next → enter the password for the certificate (the same as your Moja PG password), Next → Next → Finish → OK

  2. Double-click the OpenVPN installer file, which will have a name similar to: OpenVPN-2.6.8-I001-amd64.msi.

  3. The installer will launch. Click on the "Install now" button, agree to any prompts for changes, and once the installation is complete, close the installer.

  4. The newly installed OpenVPN might display a message indicating that configuration import is required. Close this message.

  5. Locate the OpenVPN application icon, which looks like a monitor with a padlock, in the system tray: located at the bottom right corner of your screen near the date and time, as shown in the illustration below. If necessary, use the arrow icon to display hidden icons.

image-20240208-110720.png
  1. Right-click on the OpenVPN icon and select: Import file.

  2. In the displayed window, point to the configuration file (either client_pracownik.ovpn or client_student.ovpn, depending on the choice made in step 2 of this instruction). The file should have been downloaded according to step 2 of this instruction.

  3. Relocate the OpenVPN icon again, right-click on it, and select the Edit Configuration option - as shown in the illustration."

image-20240208-112112.png

If you encounter issues accessing the aforementioned option, such as receiving an 'Error launching configuration editor' message, manually navigate to the following location on your computer: This PC → Drive C → Users → (select the folder with the name of the currently logged-in Windows user) → OpenVPN → config → client_pracownik

In the 'client_pracownik' folder, you should find two files: 'client_pracownik.ovpn' and 'pg-ca.pem'. Open the 'client_pracownik.ovpn' file using Notepad, NotePad++, or another text editor.

  1. A window will open displaying the text content of the configuration file. Locate the line with the entry: cryptoapicert "SUBJ:krotkilogin@pg.edu.pl"

"If you are an employee, replace the stringSHORTLOGINwith your 8-character login from Moja PG.

If you are a student, replace the string SHORTLOGIN with your student ID number, preceded by a lowercase 's', in the format: s123456, where 123456 should be replaced with your own student ID number."

  1. Close the window with the text content of the configuration file. Confirm that you want to save the changes

  2. Hover your mouse pointer over the gray bar with the path below. Two icons will appear on the gray bar. Click on the right icon, which is the Copy icon. The path will be copied to the clipboard.

%USERPROFILE%\OpenVPN\config\client_pracownik\

or

\%USERPROFILE%\OpenVPN\config\client_student\
  1. In Windows, open This PC or any folder. Locate the address bar - as shown in the illustration. Right-click and paste the previously copied path. Confirm by pressing Enter.

  2. The folder with the specified path should be displayed.

  3. Locate the previously downloaded PG root certificate file pg-ca.pem on your computer (by default in the Downloads folder) and copy this file (right-click on the file → Copy) to the folder with the location specified in the above steps 18-19 (right-click on an empty space in the folder → Paste).

  4. Again, locate the OpenVPN icon, right-click on it, and select the Connect option.

  5. A diagnostic window with technical messages will appear (unless there is an error - there is no need to read and analyze these messages). During the VPN tunnel setup, the OpenVPN icon will have a yellow background

  6. If the VPN tunnel is successfully established, the OpenVPN icon will have a green background

  7. Next, in your browser, navigate to the information system you intended to access via the VPN. If the access concerns the Moja PG portal, after establishing the VPN connection, the main page of Moja PG should display the following text in the bottom right corner:

    Network: politechniczna

Centrum Usług Informatycznych Politechniki Gdańskiej 2024