⬅️ **[[$-Tools|Tools]]**
***
# VPN - PiVPN
## Tipps
- use **Windows Hosts** `C:\Windows\System32\drivers\etc\hosts` file to reach SAMBA Shares via Hostnames with `<IP_Address> <Hostname>`.
- used for [[$-MCE]]
## Installation
https://pivpn.io/
https://github.com/pivpn/pivpn
https://www.sitepoint.com/setting-up-a-home-vpn-using-your-raspberry-pi/
1. Portforwarding einrichten: `1194`
2. Statische IP Adresse im Router festlegen
3. PiVPN installieren und einrichten `curl -L https://install.pivpn.io | bash`
1. Network Interface: `eth0`
2. Static IP
3. Default Gateway
4. Local User for OVPN Configuraitons
5. Enable automatic Software Updates and Patches
6. Default OpenVPN Port: `1194`
7. DNS Provider
8. Public DNS Name: `mce.selfhost.co`
9. Certificate Settings
4. `pivpn help` for help
5. `phvpnn add` to add a new profile
### List connected Devices
```
mauritz@mce-pi:~$ pivpn -c
: NOTE : The output below is NOT real-time!
: : It may be off by a few minutes.
::: Client Status List :::
Name Remote IP Virtual IP Bytes Received Bytes Sent Connected Since
tobi 93.241.208.147:50141 10.8.0.2 151KiB 75KiB Feb 24 2021 - 10:56:51
```
### HowTo add a new Member to VPN
```
sudo pivpn add
enter <username>
enter <passphrase for the OpenVPN certificate>
This is stored `/home/mauritz/ovpn/`
Open file and edit the default Port 1194 to the previously configured forwarded port 1975
.ovpn File auf Client Kopieren
OpenVPN Client installieren
Starten
Rechtsklick unten rechts `Import file`
Connect
Enter <passphrase>
```
#
***
Related:
- [[$-Netzwerk|Netzwerk]]
- [[$-Linux|Linux]]
- [[home-pi - RPi4|home-pi]]