VPN unter Linux/en: Unterschied zwischen den Versionen

IMT HilfeWiki - das Wiki
K
 
(18 dazwischenliegende Versionen von 4 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 [https://hilfe.uni-paderborn.de/Netzwerkzertifikate network 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" />
+
 
* Importieren Sie die Konfigurationsdatei  '''"OpenVPN-UPB-NG_*.ovpn"''' und das Nutzerzertifikat in den Networkmanager.
+
<bootstrap_alert color=warning>
* Verbinden Sie sich per OpenVPN mit der Universität.
+
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
  
* VPN unter Linux konfigurieren
 
 
== Step-by-step instructions ==
 
== Step-by-step instructions ==
=== Create network certificate ===
+
=== Create network certificate ===
Um OpenVPN nutzen zu können, müssen Sie zunächst ein [[Netzwerkzertifikate|persönliches Netzwerkzertifikat]] installieren.  
+
Open the Serviceportal and login with your Uni-Account.
 +
* http://sp.upb.de
 +
<br>
  
Wenn Sie das WLAN "eduroam" benutzen, ist das Zertifikat bereits auf Ihrem Rechner installiert.
+
* Click on '''Benutzerverwaltung''' and on '''Netzwerk-Einstellungen'''.
 +
<br clear=all>
  
=== Configuring VPN on Linux  ===
+
[[Datei:eduroam-win10-1.png]]
Laden Sie die Konfigurationsdatei herunter, wählen Sie hierzu das VPN mit dem Sie sich verbinden wollen aus und klicken Sie auf Download.
+
Click on '''Neues Zertifikat erstellen'''.
Im Normalfall sollte "Uni-VPN (Standard)" die richtige Wahl sein, sollten Sie jedoch Probleme mit der Verbindung haben, versuchen Sie es mit "Uni-VPN-TCP" noch einmal.
+
<br clear=all>
<iframe key="infoboard" width="600" height="320" path="vpn-config/index.php?group=uni&os=lin" />
 
  
Es wird mindestens die Version '''OpenVPN 2.4''' benötigt.
+
[[Datei:eduroam-win10-2.png|links|mini|ohne|350px]]
 +
<br>
 +
* Insert an identifier like "Laptop <Manufacturer>".
 +
* Click on '''Neues Zertifikat zusenden'''.
 +
<br clear=all>
  
== Verbindung über den Netzwerkmanager von Ubuntu ==
+
[[Datei:Eduroam-ios-3.png|links|mini|ohne|350px]]
Es gibt auch die Möglichkeit, die Verbindung über den Netzwerkmanager von Ubuntu einzurichten.
+
<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>
 +
 
 +
=== VPN unter Linux konfigurieren ===
 +
Download the configuration file, select the VPN you want to connect to and click on Download.
  
Zur Verwendung des Networkmanagers muss das vorher erstellte Netzwerkzertifikat entpackt werden:
+
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>
  
: <code>$ openssl pkcs12 -in Network_Certificate.p12 -out Network_Certificate_OPVPN.crt.pem -clcerts -nokeys </code>
+
<bootstrap_accordion>
: <code>$ openssl pkcs12 -in Network_Certificate.p12 -out Network_Certificate_OPVPN.key.pem -nocerts -nodes </code>
+
<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>
  
Die beiden neuen Dateien werden mit dem Netzwerkzertifikat an einen sicheren Ort im Benutzerverzeichnis kopiert.  
+
===Create folder===
 +
* 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>
  
  
Dazu müssen die erst die notwendigen Pakete mittels Terminal installiert werden:
+
[[Datei:Vpn-unter-linux-01.png|links|mini|ohne|350px|Folder for VPN]]
: <code># sudo apt-get install openvpn network-manager-openvpn network-manager-openvpn-gnome</code>
+
<br>
 +
* The contents of the folder should look like this.
 +
<br clear=all>
  
Mit Hilfe der Network Managers (Netwerkverbindungen) lässt sich eine neue VPN-Verbindung
+
===Configure VPN===
erstellen. Dazu muss auf „Hinzufügen“ geklickt werden.
+
[[Datei:Vpn-unter-linux-02.png|links|mini|ohne|350px|Network]]
 +
<br>
 +
* Click on the '''"Network symbol"'''.
 +
* Click on '''"Settings"'''.
 +
<br clear=all>
  
[[Datei:VPN_Unter_Linux_01.png]]
+
[[Datei:Vpn-unter-linux-03.png|links|mini|ohne|350px|Add VPN]]
 +
<br>
 +
* Click in the VPN area on the <code>+</code> to add a connection.
 +
<br clear=all>
  
 +
[[Datei:Vpn-unter-linux-04.png|links|mini|ohne|350px|Import from file]]
 +
<br>
 +
* Choose '''"Import from file..."'''.
 
<br clear=all>
 
<br clear=all>
  
 +
[[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:Konfiguration importieren.png|links|300px]]
+
[[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><br>
+
[[Datei:Vpn-unter-linux-07.png|links|mini|ohne|350px|Connect VPN]]
Im nächsten Fenster muss der Verbindungstyp OpenVPN augewählt werden.
+
<br>
 +
* Click on the switch to connect with the VPN.
 
<br clear=all>
 
<br clear=all>
  
[[Datei:Zertikate einstellen.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>
  
Anschließend müssen die eben entpackten Zertifikate ausgewählt werden. Das Feld CA-Zertifikat sollte automatisch gefüllt werden.
+
==Disconnect VPN==
 +
[[Datei:Vpn-unter-linux-09.png|links|mini|ohne|350px|Disconnect VPN]]
 +
<br>
 +
* Disconnect the VPN via the network menu.
 +
<br clear=all>
  
Falls das Feld CA-Zertifikat nicht automatisch ausgefüllt wird, sollte man die Konfigurationsdatei "'''openvpn-upb-ng-lin.ovpn"''' in "'''openvpn-upb-ng-lin.pem'''" umbenennen und diese zusätzlich in den Ordner mit den Zertifikaten legen. Danach können Sie die Datei als CA-Zertifikat auswählen.
+
==Check VPN==
 +
You can check your VPN connection by visiting:
 +
: [https://go.upb.de/ip https://go.upb.de/ip]
  
 +
[[Datei:OpenVPN verbunden - go_ip.png|center|400px|mini|ohne|Beispiel: Bestehende Verbindung ins Uni-Netz.]]
 
<br clear=all>
 
<br clear=all>
  
 +
==Advanced==
 +
* '''OpenVPN 2.4''' or newer is mandatory.
 +
* You can setup VPN via the network manager.
 +
* The certificates need to be unpacked first:
  
 +
: <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>
  
[[Datei:VPN_Unter_Linux_05.png|links|400px|mini|Abgeschlossene Einrichtung]] <br><br>
+
* The network certificate and the config file need to be stored in a secure area of the user directory.
Nach dem Speichern lässt sich die VPN-Verbindung über das obere Systemleiste aktivierven.
+
* 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".
  
<br clear=all>
+
You need to install the required packages via terminal:
 +
: <code># sudo apt-get install openvpn network-manager-openvpn network-manager-openvpn-gnome</code>
 +
 
 +
 
 +
==See also==
 +
* [[Netzwerk]]
 +
* [[VPN Problembehandlung]]

Aktuelle Version vom 6. März 2024, 13: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 - 09-13 Uhr -
Telefonsupport 08:30-13 Uhr & 13:30-15 Uhr 08:30-13 Uhr

Das IMT:Servicecenter Medien auf H1 hat aktuell von Montag bis Freitag von 08:00-13:00 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.