Benutzer-Werkzeuge

Webseiten-Werkzeuge


en:howtos:pivpn

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Nächste Überarbeitung
Vorhergehende Überarbeitung
en:howtos:pivpn [2022/02/17 17:38] – Externe Bearbeitung 127.0.0.1en:howtos:pivpn [2022/02/18 08:09] (aktuell) – Externe Bearbeitung 127.0.0.1
Zeile 1: Zeile 1:
-====== PiVPN Installation und Konfiguration ====== +====== PiVPN installation and configuration ====== 
-Die Frage, wozu man ein [[https://de.wikipedia.org/wiki/Virtual_Private_Network|VPN]] benötigt ist einfach zu beantwortener bietet die Möglichkeit die eigenen Infrastruktur auch unterwegs sinnvoll zu nutzenKonkrete Beispiele+The question why you need a [[https://de.wikipedia.org/wiki/Virtual_Private_Network|VPN]] is easy to answerit offers the possibility to use your own infrastructure sensibly on the goConcrete examples
-  * Sicheres Nutzen des Internets auch in öffentlichen HotSpots +  * Secure use of the Internet in public HotSpots 
-  * Zugriff auf die heimische Netzwerkfestplatte+  * Access to the home network hard drive
  
-VPNs werden von den unterschiedlichsten Providern angebotensind aber in der Regel kostenpflichtig oder im Datenvolumen beschränktHinzu kommt die Überlegung das man dem Anbieter vertrauen mussdenn aller Netzwerkverkehr läuft über dessen Server und kann dort mitgelesen werden.\\ +VPNs are offered by a wide variety of providersbut are usually subject to a fee or limited in data volumeIn additionthere is the consideration that you have to trust the provider, because all network traffic runs through their server and can be read there.\\ 
-Für eine eigene VPN Lösung kommen  +For your own VPN solution you can use 
-  * der eigenen (WLAN) Router  +  * your own (WLAN) router 
-  * ein Computer im heimischen Netz in Frage+  * a computer in the home network in question
  
-Einige Routerhersteller bieten in im Gerät die Möglichkeit zum Aufbau eines VPN anIch selbst habe eine Fritz!Box und finde dort die Möglichkeit einen VPN einzurichtenDie AVM Webseite bietet sehr gute HowTo Einträge dazu anAllerdings lässt die Implementierung nur "IPsec" mit "Xauth" anwas auf vielen Geräten nicht unterstützt wirdAuf SmartPhones hilft eine App der Firma AVM aber um z.B. einen Windows 10 Laptop anzubinden erfordert Software von Drittherstellern.  +Some router manufacturers offer the option of setting up a VPN in the deviceI myself have a Fritz!Box and can set up a VPN thereThe AVM website offers very good HowTo entriesHowever, the implementation only allows "IPsec" with "Xauth", which is not supported on many devicesAn app from AVM helps on smartphones, but to connect a Windows 10 laptop, for example, requires software from third-party manufacturers
-Einen Computer zu Hause zu betreiben hört sich aufwendig anist es aber nichtDer RaspBerry Pi, ein billiger (sowohl in der Anschaffung als auch im BetriebServer für ZuhauseDas Software Angebot ist überwältigendwie bei Linux üblichund auch kostenlos. \\+Running a computer at home sounds complicatedbut it isn'tThe RaspBerry Pi, a cheap (both to buy and runhome serverThe range of software is overwhelmingas usual with Linux, and also free. \\
  
-Für eine eigene VPN Lösung kommt [[https://de.wikipedia.org/wiki/OpenVPN|OpenVPN]] zu Zuge. OpenVPN unterstützt alle gängigen Plattformen und benötigt keine Server eines Providers. \\+For your own VPN solution, [[https://de.wikipedia.org/wiki/OpenVPN|OpenVPN]] comes into play. OpenVPN supports all common platforms and does not require a server from a provider. \\
  
-Wie kommt nun PiVPN ins SpielEinen OpenVPN Server zu installierenkonfigurieren und zu betreiben erfordert Fachkenntnisse, die sich nicht jedermann aneignen möchte. Um dieses Problem zu umgehen wurde mit PiVPN ein Tool zu Verfügung gestellt, das diese Aufgaben in einfacher Weise übernimmtDie [[http://www.pivpn.io/|offizielle Webseite des PiVPN Projektes]] bietet Informationen rund um das Projektauf der [[https://github.com/pivpn/pivpn|GitHub Seite des Projektes]] kann der Source Code eingesehen werden. \\+So how does PiVPN come into playInstalling, configuring and operating an OpenVPN server requires specialist knowledge that not everyone wants to acquire. To get around this problema tool was made available with PiVPN that takes over these tasks in a simple wayThe [[http://www.pivpn.io/|official website of the PiVPN project]] offers information about the projecton the [[https://github.com/pivpn/pivpn|GitHub page of the project]] the source code can be viewed. \\
  
-Lesenswerte Artikel zu diesem Thema (u.a. hilfreiche Quellen meiner ersten Versuche mit PiVPN): +Articles worth reading on this topic (including helpful sources from my first attempts with PiVPN): 
-  * [[https://www.kuketz-blog.de/pivpn-raspberry-pi-mit-openvpn-raspberry-pi-teil3/|Kuketz Blog]] in dem auch andere nütliche Einsatzzwecke des RaspBerry Pi zu finden sind +  * [[https://www.kuketz-blog.de/pivpn-raspberry-pi-mit-openvpn-raspberry-pi-teil3/|Kuketz Blog]] in which other useful uses of the RaspBerry Pi can also be found 
-  * [[https://www.ostechnix.com/pivpn-simplest-openvpn-setup-configuration-designed-raspberry-pi/|OStechnix]] mit recht ausfürlicher Installations Beschreibung +  * [[https://www.ostechnix.com/pivpn-simplest-openvpn-setup-configuration-designed-raspberry-pi/|OStechnix]] with quite detailed installation description 
-  * [[https://www.datenreise.de/raspberry-pi-vpn-server-einrichten-anleitung/|Datenreise.de]] wo die Installation und Konfiguration von OpenVPN ohne Hilfsmittel beschrieben wird +  * [[https://www.datenreise.de/raspberry-pi-vpn-server-einricht-anleitung/|Datenreise.de]] where the installation and configuration of OpenVPN is described without tools 
-  * Hilfreich ist auch [[https://github.com/pivpn/pivpn/issues|die Issue-List des OpenVPN Projektes]] in der nicht nur Fehler sondern auch Lösungen für spezielle Probleme zu finden sind+  * Also helpful is [[https://github.com/pivpn/pivpn/issues|the issue list of the OpenVPN project]] in which not only errors but also solutions for special problems can be found
-  * [[https://duckduckgo.com/?q=PiVPN+Installation&t=h_&ia=web|Suchmaschinen]] zu Recherchezwecken sind ebenfalls hilfreich+  * [[https://duckduckgo.com/?q=PiVPN+Installation&t=h_&ia=web|Search engines]] for research purposes are also helpful
  
- +===== Preparation ===== 
-===== Vorbereitung ===== +Before the installationone should gather some information that will be needed during the installationThe most important ones are listed here, in most cases suitable suggestions are made
-Vor der Installation sollte man einige Informationen zusammenstellendie während der Installation benötigt werdenDie wichtigsten sind hier gelistet, in den meisten Fällen werden geeignete Vorschläge gemacht.  +  * Name of the network interfaceusually eth0 or wlan0. Since the switch to version 9 (Stretch), the names have been changed by defaultE.g. eth0 is just called "en" followed by the MAC address 
-  * Name des Netzwerk Interfacesi.d.R. eth0 oder wlan0. Seit dem Umstieg auf die Verion 9 (Stretch) sind standardmäßig die Namen geändert wordenZ.bheißt eth0 nur "en" gefolgt von der MAC-Adresse +  * Port number on which OpenVPN should be addressedThis port number must also be forwarded to the RaspBerry Pi on the routerThe manufacturer's documentation should be consulted to set up "port forwardingon the router
-  * Port Nummer, auf der OpenVPN angesprochen werden sollDiese Portnummer muss auch auf dem Router zu dem RaspBerry Pi weitergeleitet werdenZur Einrichtung eines "Port Forwardingauf dem Router sollte die Dokumentation des Herstellers herangezogen werden+  * The protocol to be used can be UDP or TCP, each with advantages and disadvantagesI personally prefer UDP as it is a connectionless protocol and offers better performance. TCP offers the advantage that it can be better hidden if a firewall has to be circumvented. In this case it is recommended to use TCP port 443 and port-sharing with the web server
-  * Das Protokoll das benutzt werden soll, zur Auswahl stehen UDP oder TCP, die jeweils Vor- und Nachteile bietenIch persönlich ziehe UDP vor, das es ein verbindungsloses Protokoll ist und eine bessere Performance bietet. TCP bietet den Vorteil, das man es besser verstecken kann, falls eine Firewall zu umgehen ist. In diesem Fall empfiehlt es sich, den TCP Port 443 und port-sharing mit dem Webserver zu verwenden+  * Setting up a dynamic address is also necessaryThere are various free providers of such serviceswhich is the best depends on the support in the home router.
-  * Die Einrichtung einer dynamischen Adresse ist ebenfalls von NötenEs gibt diverse kostenlose Anbieter solcher Dienstewelcher der Beste ist hängt von der Ünterstützung im heimischen Router ab+
 ===== Installation ===== ===== Installation =====
   curl -L https://install.pivpn.io | bash   curl -L https://install.pivpn.io | bash
      
-Das war es schones werden im Verlauf der Installations eingie Fragen gestelltderen Antworten für den "normalen" VPN Nutzer sinnvoll vorbelegt sindEs empfiehlt sich, einen Blick in die [[https://www.sitepoint.com/setting-up-a-home-vpn-using-your-raspberry-pi/|englische Step-by-Step Anleitung]] zu werfen, um einen Eindruck über die auszuwählenden Antworten zu bekommen+That's ita few questions are asked during the installationthe answers to which are pre-assigned for the "normal" VPN userIt is advisable to take a look at the [[https://www.sitepoint.com/setting-up-a-home-vpn-using-your-raspberry-pi/|English step-by-step instructions]]. to get an impression of the answers to be selected
-\\  +\\ 
-Nach erfolgter Installation ist [[http://www.pivpn.io/|PiVPN]] einsatzbereit.Es können sofort Profile für die Clients angelegt werdendie mit jeder Plattform (Windows, Mac, Android, IOS oder auch Raspberry Pi) genutzt werden könnenDownload Links für die Clients führe ich hier auf+After the installation, [[http://www.pivpn.io/|PiVPN]] is ready for useProfiles for the clients can be created immediatelywhich can be used with any platform (Windows, Mac, Android, IOS or Raspberry Pi). can become. I list download links for the clients here
-\\ +\\
   * [[https://itunes.apple.com/de/app/openvpn-connect/id590379981?mt=8|IOS]]   * [[https://itunes.apple.com/de/app/openvpn-connect/id590379981?mt=8|IOS]]
   * [[https://play.google.com/store/apps/details?id=de.blinkt.openvpn&hl=de|Android]]   * [[https://play.google.com/store/apps/details?id=de.blinkt.openvpn&hl=de|Android]]
Zeile 43: Zeile 42:
  
  
-===== Konfiguration ===== +===== Configuration ===== 
-Wir haben nun ein funktionierendes VPN (__V__irtual __P__rivat __N__etwork) in dem alle teilnehmenden Geräte miteinander verbunden sindAlle Teilnehmer (Clientsbenutzen den Internetzugang des OpenVPN Servers (in diesem Fall unser Raspberry Pi) und jeglicher Internetzugriff erfolgt über das heimische NetzDabei ist der Verkehr zwischen OpenVPN Client und OpenVPN Server immer verschlüsseltDamit ist auch in öffentlichen HotSpots eine gesicherte Verbindung gewährleistet.\\  +We now have a working VPN (__V__irtual __P__rivat __N__etwork) in which all participating devices are connected to each otherAll participants (clientsuse the Internet access of the OpenVPN server (in this case our Raspberry Pi) and all Internet access is via the home networkThe traffic between OpenVPN client and OpenVPN server is always encryptedThis also ensures a secure connection in public HotSpots.\\ 
-Manchmal wollen wir aber mehrz.BZugriff auf andere Geräte in unserem Heimnetzdas NAS Laufwerk ist dafür ein BeispielUm Zugriff auf das Heimnetz zu erhaltenmuss eine "Route", also der Weg von Client über das VPN zum Heimnetzdefiniert werden+But sometimes we want moree.gaccess to other devices in our home networkthe NAS drive is an exampleIn order to gain access to the home network"route", i.e. the path from the client via the VPN to the home networkmust be defined
-Dazu muss die Konfigurationsdatei des OpenVPN Servers (etc/openvpn/server.conf) geändert werden und um folgende Zeilen (am Besten am Ende der Dateiergänzt werden:+To do this, the configuration file of the OpenVPN server (etc/openvpn/server.conf) must be changed and the following lines added (preferably at the end of the file):
      
   push "route 192.168.178.0 255.255.255.0 10.8.0.1"   push "route 192.168.178.0 255.255.255.0 10.8.0.1"
   route 192.168.178.0 255.255.255.0 10.8.0.1   route 192.168.178.0 255.255.255.0 10.8.0.1
  
-Damit kommen wir nun über den VPN an die Geräte in unserem Heimnetzkönnen diese aber nicht mit einem Namen ansprechenSollte der heimische Router einen DNS Service für das Heimnetz (wie z.Bdie Fritz Box) zur Verfügung stellenkönnen die Geräte auch über Namen angesprochen werdenIn der /etc/openvpn/server.conf muss dazu der Eintrag +We can now access the devices in our home network via the VPNbut we cannot address them with a nameIf the home router provides a DNS service for the home network (e.gthe Fritz Box), the devices can also be addressed by nameThe entry must be made in /etc/openvpn/server.conf 
-  push "dhcp-option DNS 192.168.178.1" +  push "dhcp option DNS 192.168.178.1" 
-  push "dhcp-option DOMAIN fritz.box +  push "dhcp option DOMAIN fritz.box 
-ergänzt werden+be added.
  
-===== Clients anlegen und verwalten ===== +===== Create and manage clients ===== 
-Der Server läuftkommen wir nun zu den ClientsAuf jedem Client muss die OpenVPN Software installiert werden und eine Konfigurationsdatei übergeben werdenDiese Konfigurationsdatei wird für den OpenVPN Client benötigtDie Installation der OpenVPN Software zu beschreiben erübrigt sichdas sich diese je nach Plattform unterscheidetich überlasse das mal dem freundlichen Herrn Google. +The server is runningnow we come to the clientsThe OpenVPN software must be installed on each client and a configuration file must be transferredThis configuration file is required for the OpenVPN clientThere is no need to describe the installation of the OpenVPN softwareas this differs depending on the platformI'll leave that to the friendly Mr. Google. 
-Wie kommen wir nun an eine KonfigurationsdateiBisher haben wir nur über Openvpn gesprochenaber nicht über PiVPN. PiVPN liefert uns ein paar hilfreiche Tools zur Pflege und zum Betrieb unseres VPN. Um nicht in endlosen Nächten die Konfigurationsoptionen für einen OpenVPN Client zu lesen und zu verstehengeben wir einfach dem Befehl+How do we get a configuration file nowSo far we've only talked about Openvpn, but not PiVPN. PiVPN provides us with a few helpful tools for maintaining and operating our VPN. In order not to spend endless nights reading and understanding the configuration options for an OpenVPN clientwe simply give the command
   pivpn --help   pivpn --help
   ::: Control all PiVPN specific functions!   ::: Control all PiVPN specific functions!
Zeile 64: Zeile 63:
   ::: Usage: pivpn <command> [option]   ::: Usage: pivpn <command> [option]
   :::   :::
-  ::: Commands+  ::: commands
-  :::  -a, add [nopass]     Create a client ovpn profile, optional nopass +  ::: -a, add [nopass] Create a client ovpn profile, optionally nopass 
-  :::  -c, clients          List any connected clients to the server +  ::: -c, clients List any connected clients to the server 
-  :::  -d, debug            Start a debugging session if having trouble +  ::: -d, debug Start a debugging session if having trouble 
-  :::  -l, list             List all valid and revoked certificates +  ::: -l, list List all valid and revoked certificates 
-  :::  -r, revoke           Revoke a client ovpn profile +  ::: -r, revoke Revoke a client ovpn profile 
-  :::  -h, help             Show this help dialog +  ::: -h, help Show this help dialog 
-  :::  -u, uninstall        Uninstall PiVPN from your system!+  ::: -u, uninstall Uninstall PiVPN from your system!
      
-und erhalten eine Liste der verfügbaren OptionenEine Client Konfigurationsdatei wird z.B. mit +and get a list of available optionsA client configuration file is e.g
   pivpn -a   pivpn -a
-  Enter a Name for the Client:  meiniphone+  Enter a Name for the Client: myiphone
   Enter the password for the client:   Enter the password for the client:
   Enter the password again to verify:   Enter the password again to verify:
-  spawn ./easyrsa build-client-full meiniphone+  spawn ./easyrsa build-client-full myiphone
   Note: using Easy-RSA configuration from: ./vars   Note: using Easy-RSA configuration from: ./vars
   rand: Use -help for summary.   rand: Use -help for summary.
   Generating a 4096 bit RSA private key   Generating a 4096 bit RSA private key
   ..........................++   ..........................++
-  ......................................................+++  .................................................. ....++
   writing new private key to '/etc/openvpn/easy-rsa/pki/private/meiniphone.key.Pc9twDGhFw'   writing new private key to '/etc/openvpn/easy-rsa/pki/private/meiniphone.key.Pc9twDGhFw'
   Enter PEM pass phrase:   Enter PEM pass phrase:
Zeile 90: Zeile 89:
   Using configuration from /etc/openvpn/easy-rsa/openssl-1.0.cnf   Using configuration from /etc/openvpn/easy-rsa/openssl-1.0.cnf
   Check that the request matches the signature   Check that the request matches the signature
-  Signature ok+  signature ok
   The Subject's Distinguished Name is as follows   The Subject's Distinguished Name is as follows
-  commonName            :ASN.1 12:'meiniphone'+  commonName :ASN.1 12:'myiphone'
   Certificate is to be certified until Sep 12 12:54:03 2027 GMT (3650 days)   Certificate is to be certified until Sep 12 12:54:03 2027 GMT (3650 days)
   Write out database with 1 new entries   Write out database with 1 new entries
-  Data Base Updated +  Database updated 
-  Client's cert found: meiniphone.crt +  Client's cert found: myiphone.crt 
-  Client's Private Key found: meiniphone.key +  Client's Private Key found: myiphone.key 
-  CA public Key found: ca.crt+  CA public key found: ca.crt
   tls-auth Private Key found: ta.key   tls-auth Private Key found: ta.key
-  ======================================================== +  ================================================== 
-  Done! meiniphone.ovpn successfully created! +  Done! myiphone.ovpn successfully created! 
-  meiniphone.ovpn was copied to:+  myiphone.ovpn was copied to:
     /home/pi/ovpns     /home/pi/ovpns
   for easy transfer.   for easy transfer.
-  ======================================================== +  ================================================== 
-   +We have now created our first client and must transfer the resulting configuration file to the clientWe can see where to find it in the last paragraph of the output.
-Damit haben wir jetzt unseren ersten Client angelegt und müssen die so entstandende Konfigurationsdatei auf den Client übertragenWo sie zu finden ist, sehen wir im letzten Absatz des Output.+
  
-====== Für Experten ====== +====== For experts ====== 
-Über die gängige Nutzung hinausNutzung der Heimnetzes von außerhalbhabe ich folgendes Setup implementiertDer OpenVPN Server ist auf einem KVM Server meines WebHosters mit Debian 9 installiertalso außerhalb des HeimnetzesDie Installation von PiVPN klappt auch problemlos unter Debian, da ja die Standardpakete aus dem Repository des Servers installiert werden und Raspbian auf Debian basiert+In addition to the usual useuse of the home network from outsideI have implemented the following setupThe OpenVPN server is installed on a KVM server of my web host with Debian 9, i.e. outside of the home network. The installation of PiVPN also works without any problems under Debian, since the standard packages are installed from the server repository and Raspbian is based on Debian. 
-Das Ziel soll sein folgende Verbindung zu ermöglichen:\\  +The aim should be to enable the following connection:\\ 
-  Heimnetz <- Raspberry Pi <-> OpenVPN Server <-> OpenVPN Client +  Home Network <- Raspberry Pi <-> OpenVPN Server <-> OpenVPN Client 
-zu realisierenBeachte, das zwischen Heimnetz und Raspberry Pi der Pfeil nur in eine Richtung zeigt+to realizeNote that between home network and Raspberry Pi, the arrow only points in one direction
-===== Vorbereitung ===== +===== Preparation ===== 
-Mein Server im Internet hat also erstmal keinen Zugriff auf andere, private NetzeIn meinem Heimnetz habe ich nun einen Raspberry Pi als Client implementiertder sich von zu Hause mit dem Internetserver verbindetAuch der Client ist in der Lage Routen zu propagierenalso habe ich auf dem Raspberry Pi dafür gesorgt, das Datenpakete von einem Adapter (das Tunnel Device des OpenVPN) zu einem anderen weitergeleitet werden dürfenIn der Datei /etc/sysctl.conf macht dies der Eintrag+My server on the Internet has no access to other, private networksI have now implemented a Raspberry Pi as a client in my home networkwhich connects to the internet server from homeThe client is also able to propagate routesso I made sure on the Raspberry Pi that data packets can be forwarded from one adapter (the OpenVPN tunnel deviceto anotherThe entry makes this in the /etc/sysctl.conf file
   net.ipv4.ip_forward=1   net.ipv4.ip_forward=1
-Um dies ohne reboot zu aktivieren muss der Befehl+To enable this without a reboot, the command
   sudo sysctl -w net.ipv4.ip_forward=1   sudo sysctl -w net.ipv4.ip_forward=1
-abgesetzt werdenDer Eintrag in der sysctl.conf dient nur dazu das diese Einstellung nach dem reboot wieder aktiviert istUm uns das Leben schwer zu machen (und den Server sichermischt sich nun die Firewall auf dem Raspberry Pi eindie den technisch möglichen Traffic wieder unterbindetDie Befehle+be dropped off; be discontinued; be deducted; be dismissedThe entry in the sysctl.conf only serves to enable this setting again after the reboot. In order to make life difficult for us (and to keep the server safe), the firewall on the Raspberry Pi now interveneswhich blocks the technically possible traffic againThe commands
   /sbin/iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE   /sbin/iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
   /sbin/iptables -A FORWARD -i wlan0 -o tun0 -m state --state RELATED,ESTABLISHED -j ACCEPT   /sbin/iptables -A FORWARD -i wlan0 -o tun0 -m state --state RELATED,ESTABLISHED -j ACCEPT
   /sbin/iptables -A FORWARD -i tun0 -o wlan0 -j ACCEPT   /sbin/iptables -A FORWARD -i tun0 -o wlan0 -j ACCEPT
-sorgen dafür, das die Firewall den Traffic akzeptiertDiese Einstellungen überleben keinen Rebootalso muss unter /etc/init.d ein Script hinterlegt werden, das diese Einstellungen nach dem Netzwerk Start wieder aktiviertBesser (und empfohlenist die Methode über das Paket [[https://packages.debian.org/iptables-persistent|iptables-persistent]] dafür zu sorgen, das nach dem Netzwerk Start auch die Firewall Regeln aktiv sind.+ensure that the firewall accepts the trafficThese settings do not survive a rebootso a script must be stored under /etc/init.d that reactivates these settings after the network startBetter (and recommendedis the method via the package [[https://packages.debian.org/iptables-persistent|iptables-persistent]] to ensure that the firewall rules are also active after the network start.
   sudo apt-get install iptables-persistent netfilter-persistent   sudo apt-get install iptables-persistent netfilter-persistent
-Die Frage, ob die aktuellen Regeln übernommen werden sollen, kann man getrost mit "Yes" beantwortenIn den Dateien /etc/iptables/rules.v4 und /etc/iptables/rules.v6 findet man nun die aktuell gültigen Einstellungen, die beim Reboot aktiviert werdenDie Befehle +The question of whether the current rules should be adopted can confidently be answered with "Yes"The files /etc/iptables/rules.v4 and /etc/iptables/rules.v6 now contain the currently valid settings that are activated on rebootThe commands 
-  sudo iptables-save >dateiname +  sudo iptables-save >filename 
-  sudo iptables-restore <dateiname +  sudo iptables-restore <filename 
-dienen dazu die aktuellen Regeln zu sicher oder wiederherzustellenUm geänderte Regeln für den Reboot zu speichern muss die Datei /etc/iptables/rules.v4 mit den Befehlen+serve to save or restore the current rulesIn order to save changed rules for the reboot, the file /etc/iptables/rules.v4 with the commands
   sudo iptables-save >/etc/iptables/rules.v4   sudo iptables-save >/etc/iptables/rules.v4
-geändert werdenWie das Ganze mit IPv6 funktioniert überlasse ich den man-pages. =) +be changedHow the whole thing works with IPv6 I leave to the man pages. =) 
-===== Konfiguration ===== +===== Configuration ===== 
-Jetzt ist der Moment gekommen, die Verbindung zu ermöglichenDer OpenVPN Client auf dem Raspberry Pi muss dem OpenVPN Server nun mitteilen, das er eine Route in ein Netzwerk zur Verfügung stelltDazu muss auf dem OpenVPN Server eine neue Datei unter /etc/openvpn/client-config angelegt werdenDer Dateiname MUSS mit dem Namen der beim "pivpn -a" Befehl vergeben wird übereinstimmenDer Inhalt ist wie folgt:+Now is the moment to enable the connectionThe OpenVPN client on the Raspberry Pi must now tell the OpenVPN server that it is providing a route to a networkTo do this, a new file must be created on the OpenVPN server under /etc/openvpn/client-config. The filename MUST match the name given by the "pivpn -a" commandThe content is as follows:
   ifconfig-push 10.8.0.250 255.255.255.0   ifconfig-push 10.8.0.250 255.255.255.0
   iroute 192.168.178.0 255.255.255.0   iroute 192.168.178.0 255.255.255.0
-Sobald sich der Raspberry Pi am VPN anmeldet werden die entsprechenden Route an alle Clientsdie sich DANACH am VPN anmelden, mitgeteiltAuch der OpenVPN Server nimmt die Routen sofort zur Kenntnis.\\ +As soon as the Raspberry Pi registers with the VPN, the corresponding route is communicated to all clients who AFTER register with the VPN. The OpenVPN server also takes note of the routes immediately.\\ 
-Stellt sich die Frage, wie man sicherstellt, das der Raspberry Pi immer die oben genannte Adresse 10.8.0.250 erhältGute Fragehier die AntwortEine weitere Konfigurationsdatei wird auf dem Server benötigtdie ihn anweist dem Raspberry Pi immer die gleiche IP zuzuweisenDie Datei heißt \\  +The question arises how to ensure that the Raspberry Pi always receives the above address 10.8.0.250. Good questionhere is the answerAnother configuration file is required on the serverwhich instructs it to always assign the same IP to the Raspberry Pi. The file is called \\ 
-/etc/openvpn/client-config/dhcp-persist und muss im ersten, durch Komma getrennten, Feld den korrekten Namen den man bei "pivpn -a" vergeben hat, enthalten.+/etc/openvpn/client-config/dhcp-persist and must contain the correct name that was assigned with "pivpn -a" in the first field separated by commas.
   client_name,10.8.0.250   client_name,10.8.0.250
-"client_name" ist also durch diesen Namen zu ersetzen. \\ +"client_name" should therefore be replaced with this name. \\ 
-Wenn ich nichts vergessen habe und alles richtig installiert und konfiguriert wurde funktioniert jetzt allesEin weiteres "Heimnetzeinzubindenz.Bdas der Freundinist jetzt nicht mehr weiter schwierigoder? +If I didn't forget anything and everything was installed and configured correctly, everything works nowIntegrating another "home network", e.gthat of a girlfriendis no longer difficultis it?
- +
- +
en/howtos/pivpn.1645119498.txt.gz · Zuletzt geändert: 2022/02/17 17:38 von 127.0.0.1