VPN unter Linux/en: Unterschied zwischen den Versionen

IMT HilfeWiki - das Wiki
(Die Seite wurde komplett ins Englische übersetzt)
 
(19 dazwischenliegende Versionen von 5 Benutzern werden nicht angezeigt)
Zeile 4: Zeile 4:
 
|translated title=VPN on Linux
 
|translated title=VPN on Linux
 
}}
 
}}
VPN (Virtual Private Network) is needed if you want to use your computer from outside the university to access services that are only accessible within the university network. VPN guarantees secure access to the university network from other networks (dial-up via other providers, external company or university networks).
 
  
== What needs to be done? ==
+
{{ambox
* To use OpenVPN, you must first download a [[Netzwerkzertifikate|etwork certificate]].
+
|type=notice
* Use your package manager to install OpenVPN version >2.4 and the OpenVPN support for the network manager.
+
|text=Linux is only rudimentarily supported by the IMT. Info is addressed to "professionals". Use at your own risk.
* Download the configuration file:
+
}}
<iframe key="infoboard" width="600" height="320" path="vpn-config/index.php?group=uni&os=lin" />
+
 
* Import the configuration file '''"OpenVPN-UPB-NG_*.ovpn"''' and the user certificate into the network manager.
+
<bootstrap_alert color=warning>
* Connect to the university via OpenVPN.
+
On 30/03/2023, the certificates for the VPN service were updated. You can use VPN only if you have installed the current configuration file. You do not need to install a new user certificate.
 +
</bootstrap_alert>
 +
 
 +
VPN (Virtual Private Network) is needed if you want to use your computer from outside the university to access services that are only accessible within the university network. VPN guarantees secure access to the university network through other networks (dial-up via other providers, external company or university networks).
 +
<br><br>
 +
 
 +
This guide is based on Ubuntu 22.04.2 LTS. Other distributions may work similarly. We cannot provide a guide for every distribution.
 +
 
 +
== What needs to be done? ==
 +
* Download personal network certificate.
 +
* Download configuration file:
 +
<iframe key="infoboard" width="600" height="330" path="vpn-config/index.php?group=uni&os=lin&redirect_gateway=1" />
 +
* Store network certificate and configuration file in a folder. Don't change the path later.
 +
* Rename the certificate.
 +
* Setup VPN
  
* Configuring VPN on Linux
 
 
== Step-by-step instructions ==
 
== Step-by-step instructions ==
=== Create network certificate ===
+
=== Create network certificate ===
To use OpenVPN, you must first install a [https://hilfe.uni-paderborn.de/Netzwerkzertifikate personal network] certificate.  
+
Open the Serviceportal and login with your Uni-Account.
 +
* http://sp.upb.de
 +
<br>
 +
 
 +
* Click on '''Benutzerverwaltung''' and on '''Netzwerk-Einstellungen'''.
 +
<br clear=all>
 +
 
 +
[[Datei:eduroam-win10-1.png]]
 +
Click on '''Neues Zertifikat erstellen'''.
 +
<br clear=all>
 +
 
 +
[[Datei:eduroam-win10-2.png|links|mini|ohne|350px]]
 +
<br>
 +
* Insert an identifier like "Laptop <Manufacturer>".
 +
* Click on '''Neues Zertifikat zusenden'''.
 +
<br clear=all>
  
If you use the WLAN "eduroam", the certificate is already installed on your computer.
+
[[Datei:Eduroam-ios-3.png|links|mini|ohne|350px]]
 +
<br>
 +
* You created a new network certificate.
 +
* Copy the '''Import Passwort''' or leave the tab open for later.
 +
* Download the network certificate via '''"Netzwerkzertifikat herunterladen"'''.
 +
<br clear=all>
  
=== Configuring VPN on Linux ===
+
=== VPN unter Linux konfigurieren ===
 
Download the configuration file, select the VPN you want to connect to and click on Download.
 
Download the configuration file, select the VPN you want to connect to and click on Download.
  
Normally "Uni-VPN (Standard)" should be the right choice, but if you have problems with the connection, try "Uni-VPN-TCP" again.<iframe key="infoboard" width="600" height="320" path="vpn-config/index.php?group=uni&os=lin" />
+
Usually "Uni-VPN (Standard)" should work, but if you have problems with the connection, try "Uni-VPN-TCP".
 +
<iframe key="infoboard" width="600" height="330" path="vpn-config/index.php?group=uni&os=lin&redirect_gateway=1" />
 +
<br clear=all>
 +
<span style="color:green"> Information:</span> You can click here on '''"Download"'''. This is not a screenshot ;-).
 +
<br clear=all>
  
At least version '''OpenVPN 2.4''' is required.
+
<bootstrap_accordion>
 +
<bootstrap_panel heading="Den gesamten Internetverkehr durch den Tunnel leiten?">
 +
* Access to online resources may require that you route all network traffic through the tunnel.
 +
* For access to network drives only, you do not need this option.
 +
</bootstrap_panel>
 +
</bootstrap_accordion>
  
== Connection via the network manager of Ubuntu ==
+
===Create folder===
There is also the possibility to set up the connection via the network manager of Ubuntu.
+
* Create a new folder and place the network certificate and the configuration file there.
 +
* Choose the location carefully - you must not move or rename the folder later.
 +
* Rename the network certificate in <code>Network_Certificate.p12</code>
  
To use the network manager, the previously created network certificate must be unpacked:
 
: <code>$ openssl pkcs12 -in Network_Certificate.p12 -out Network_Certificate_OPVPN.crt.pem -clcerts -nokeys </code>
 
: <code>$ openssl pkcs12 -in Network_Certificate.p12 -out Network_Certificate_OPVPN.key.pem -nocerts -nodes </code>
 
  
The two new files are copied to a secure location in the user directory with the network certificate.  
+
[[Datei:Vpn-unter-linux-01.png|links|mini|ohne|350px|Folder for VPN]]
 +
<br>
 +
* The contents of the folder should look like this.
 +
<br clear=all>
  
 +
===Configure VPN===
 +
[[Datei:Vpn-unter-linux-02.png|links|mini|ohne|350px|Network]]
 +
<br>
 +
* Click on the '''"Network symbol"'''.
 +
* Click on '''"Settings"'''.
 +
<br clear=all>
  
To do this, the necessary packages must first be installed via terminal:
+
[[Datei:Vpn-unter-linux-03.png|links|mini|ohne|350px|Add VPN]]
: <code># sudo apt-get install openvpn network-manager-openvpn network-manager-openvpn-gnome</code>
+
<br>
 +
* Click in the VPN area on the <code>+</code> to add a connection.
 +
<br clear=all>
  
With the help of the Network Managers (network connections) a new VPN connection can be create. To do this, click on "Add".
+
[[Datei:Vpn-unter-linux-04.png|links|mini|ohne|350px|Import from file]]
 +
<br>
 +
* Choose '''"Import from file..."'''.
 +
<br clear=all>
  
[[Datei:VPN_Unter_Linux_01.png]]
+
[[Datei:Vpn-unter-linux-05.png|links|mini|ohne|350px|Config file]]
 +
<br>
 +
* Navigate to the folder that we created for the VPN.
 +
* Select the '''config file'''.
 +
* Click on '''"Open"'''.
 +
<br clear=all>
  
 +
[[Datei:Vpn-unter-linux-06.png|links|mini|ohne|350px|VPN Settings]]
 +
<br>
 +
* The VPN settings have been imported from the config file.
 +
* Insert the '''"Import-Passwort"''' for the network certificate. (1)
 +
* Click on '''"Add"'''. (2)
 
<br clear=all>
 
<br clear=all>
  
 +
[[Datei:Vpn-unter-linux-07.png|links|mini|ohne|350px|Connect VPN]]
 +
<br>
 +
* Click on the switch to connect with the VPN.
 +
<br clear=all>
  
[[Datei:Konfiguration importieren.png|links|300px]]
+
===Connect VPN===
 +
[[Datei:Vpn-unter-linux-08.png|links|mini|ohne|350px|Connect VPN]]
 +
<br>
 +
* You can also connect the VPN via the network menu.
 +
<br clear=all>
  
<br><br>
+
==Disconnect VPN==
In the next window the connection type OpenVPN must be selected.
+
[[Datei:Vpn-unter-linux-09.png|links|mini|ohne|350px|Disconnect VPN]]
 +
<br>
 +
* Disconnect the VPN via the network menu.
 
<br clear=all>
 
<br clear=all>
  
[[Datei:Zertikate einstellen.png|links|300px]]
+
==Check VPN==
 +
You can check your VPN connection by visiting:
 +
: [https://go.upb.de/ip https://go.upb.de/ip]
  
Afterwards the just unpacked certificates must be selected. The CA certificate field should be filled automatically.
+
[[Datei:OpenVPN verbunden - go_ip.png|center|400px|mini|ohne|Beispiel: Bestehende Verbindung ins Uni-Netz.]]
 +
<br clear=all>
  
If the CA certificate field is not filled in automatically, the configuration file '''"openvpn-upb-ng-lin.ovpn"''' should be renamed to '''"openvpn-upb-ng-lin.pem"''' and additionally placed in the folder with the certificates. Then you can select the file as a CA certificate.
+
==Advanced==
 +
* '''OpenVPN 2.4''' or newer is mandatory.
 +
* You can setup VPN via the network manager.
 +
* The certificates need to be unpacked first:
  
<br clear=all>
+
: <code>$ openssl pkcs12 -in Network_Certificate.p12 -out Network_Certificate_OPVPN.crt.pem -clcerts -nokeys </code>
 +
: <code>$ openssl pkcs12 -in Network_Certificate.p12 -out Network_Certificate_OPVPN.key.pem -nocerts -nodes </code>
  
 +
* The network certificate and the config file need to be stored in a secure area of the user directory.
 +
* Under OpenSSL 3.0.2 maybe an additional parameter is necessary: <code>-legacy</code>
 +
* It my be necessary (e.g. Arch) to install the "openssl-1.1" package and run the prompts above with "openssl-1.1" instead of "openssl".
  
 +
You need to install the required packages via terminal:
 +
: <code># sudo apt-get install openvpn network-manager-openvpn network-manager-openvpn-gnome</code>
  
[[Datei:VPN_Unter_Linux_05.png|links|400px|mini|Abgeschlossene Einrichtung]] <br><br>
 
After saving, the VPN connection can be activated via the upper system bar.
 
  
<br clear=all>
+
==See also==
 +
* [[Netzwerk]]
 +
* [[VPN Problembehandlung]]

Aktuelle Version vom 6. März 2024, 14:23 Uhr

Die deutsche Version finden Sie auf der Seite VPN unter Linux

VPN (Virtual Private Network) is needed if you want to use your computer from outside the university to access services that are only accessible within the university network. VPN guarantees secure access to the university network through other networks (dial-up via other providers, external company or university networks).

This guide is based on Ubuntu 22.04.2 LTS. Other distributions may work similarly. We cannot provide a guide for every distribution.

What needs to be done?[Bearbeiten | Quelltext bearbeiten]

  • Download personal network certificate.
  • Download configuration file:

  • Store network certificate and configuration file in a folder. Don't change the path later.
  • Rename the certificate.
  • Setup VPN

Step-by-step instructions[Bearbeiten | Quelltext bearbeiten]

Create network certificate[Bearbeiten | Quelltext bearbeiten]

Open the Serviceportal and login with your Uni-Account.


  • Click on Benutzerverwaltung and on Netzwerk-Einstellungen.


Eduroam-win10-1.png Click on Neues Zertifikat erstellen.

Eduroam-win10-2.png


  • Insert an identifier like "Laptop <Manufacturer>".
  • Click on Neues Zertifikat zusenden.


Eduroam-ios-3.png


  • You created a new network certificate.
  • Copy the Import Passwort or leave the tab open for later.
  • Download the network certificate via "Netzwerkzertifikat herunterladen".


VPN unter Linux konfigurieren[Bearbeiten | Quelltext bearbeiten]

Download the configuration file, select the VPN you want to connect to and click on Download.

Usually "Uni-VPN (Standard)" should work, but if you have problems with the connection, try "Uni-VPN-TCP".
Information: You can click here on "Download". This is not a screenshot ;-).

  • Access to online resources may require that you route all network traffic through the tunnel.
  • For access to network drives only, you do not need this option.

Create folder[Bearbeiten | Quelltext bearbeiten]

  • Create a new folder and place the network certificate and the configuration file there.
  • Choose the location carefully - you must not move or rename the folder later.
  • Rename the network certificate in Network_Certificate.p12


Folder for VPN


  • The contents of the folder should look like this.


Configure VPN[Bearbeiten | Quelltext bearbeiten]

Network


  • Click on the "Network symbol".
  • Click on "Settings".


Add VPN


  • Click in the VPN area on the + to add a connection.


Import from file


  • Choose "Import from file...".


Config file


  • Navigate to the folder that we created for the VPN.
  • Select the config file.
  • Click on "Open".


VPN Settings


  • The VPN settings have been imported from the config file.
  • Insert the "Import-Passwort" for the network certificate. (1)
  • Click on "Add". (2)


Connect VPN


  • Click on the switch to connect with the VPN.


Connect VPN[Bearbeiten | Quelltext bearbeiten]

Connect VPN


  • You can also connect the VPN via the network menu.


Disconnect VPN[Bearbeiten | Quelltext bearbeiten]

Disconnect VPN


  • Disconnect the VPN via the network menu.


Check VPN[Bearbeiten | Quelltext bearbeiten]

You can check your VPN connection by visiting:

https://go.upb.de/ip
Beispiel: Bestehende Verbindung ins Uni-Netz.


Advanced[Bearbeiten | Quelltext bearbeiten]

  • OpenVPN 2.4 or newer is mandatory.
  • You can setup VPN via the network manager.
  • The certificates need to be unpacked first:
$ openssl pkcs12 -in Network_Certificate.p12 -out Network_Certificate_OPVPN.crt.pem -clcerts -nokeys
$ openssl pkcs12 -in Network_Certificate.p12 -out Network_Certificate_OPVPN.key.pem -nocerts -nodes
  • The network certificate and the config file need to be stored in a secure area of the user directory.
  • Under OpenSSL 3.0.2 maybe an additional parameter is necessary: -legacy
  • It my be necessary (e.g. Arch) to install the "openssl-1.1" package and run the prompts above with "openssl-1.1" instead of "openssl".

You need to install the required packages via terminal:

# sudo apt-get install openvpn network-manager-openvpn network-manager-openvpn-gnome


See also[Bearbeiten | Quelltext bearbeiten]


Bei Fragen oder Problemen wenden Sie sich bitte telefonisch oder per E-Mail an uns:

Tel. IT: +49 (5251) 60-5544 Tel. Medien: +49 (5251) 60-2821 E-Mail: imt@uni-paderborn.de

Das Notebook-Café ist die Benutzerberatung des IMT

Das IMT:Notebook-Café (Raum I0.401) bietet in der vorlesungsfreien Zeit nur eingeschränkten Support

Mo Di-Do Fr
Vor-Ort-Support 08:30-16 Uhr 08:30-14 Uhr
Telefonsupport 08:30-16 Uhr 08:30-14 Uhr

Das IMT:Servicecenter Medien auf H1 hat ab 8. April wieder von Montag bis Donnerstag von 08:00-16:00 Uhr und Freitags von 08:00 bis 14:30 Uhr geöffnet.

Cookies helfen uns bei der Bereitstellung des IMT HilfeWikis. Bei der Nutzung vom IMT HilfeWiki werden die in der Datenschutzerklärung beschriebenen Cookies gespeichert.