Skip to main content

How to use OpenVPN

These are the general steps to use OpenVPN:

1. Get the necessary configuration files from your VPN provider.

2. Start OpenVPN and click the "Import" button to import the configuration files.

Before you can get two systems to be able to connect through an OpenVPN "tunnel," you need to generate a key that will be used to encrypt all communication. This key must be "installed" on both systems since, in the case of a symmetric key cryptography, both "interlocutors" will use the same key.

To proceed, simply click on the Generate a static OpenVPN key link by accessing the Start menu, then Programs, OpenVPN, Generate a static OpenVPN key.

The program will show a text window inviting you to press any key to start the key generation procedure. OpenVPN will produce a 2048 bit encryption key which will be stored in the config subfolder with the name of key.txt.

1-openvpn.png

To create a first test connection with OpenVPN, start by copying the sample.ovpn file from the folder containing the sample files into the config folder.

After starting OpenVPN GUI, right-clicking on the icon in the traybar, click Edit config: this will immediately open the contents of the sample.ovpn configuration file.

2-openvpn.png

In this file it is necessary, first of all, to modify some essential parameters. In particular, the name or IP address of the other host involved in the VPN, the name of the file containing the key, the IP address of the VPN and the host must be indicated.
Then choose an IP address for each host of the VPN (for example, 10.3.0.1, 10.3.0.2 and so on).

3. If necessary, enter the login credentials provided by the VPN provider.

4. Click on the "Connect" button to connect to the VPN.

5. Once connected, you can browse the Internet securely and access protected network resources.

6. To disconnect from the VPN, click the "Disconnect" button.

It's recommended to consult the official OpenVPN documentation at https://openvpn.net/community-resources/reference-manual-for-openvpn-2-6/ for more information and advanced features, such as creating new configurations and customizing settings. Also, since setting up and using OpenVPN can vary by VPN provider, you should also consult the documentation provided by your VPN provider.