An easy to use VPN server and client system. The DietPi installation of OpenVPN uses a single client file to get you connected with minimal hassle.
Obtaining the Client connection file (DietPi_OpenVPN_Client.ovpn):
DietPi will automatically generate unique 2048 bit server and client keys during installation and place them into a unified client config file.
You will need this file to connect to your OpenVPN server from a client.
Client file location:
Setting up your router for external access:
- DietPi will generate the client config file and place it here: /boot/DietPi_OpenVPN_Client.ovpn. Simply power off and plug the SD card into your PC to obtain the file from the FAT partition.
- DietPi will also create a copy of the file in /mnt/dietpi_userdata/DietPi_OpenVPN_Client.ovpn. Use one of DietPi's file servers to access this file.
- Please remove those files after they have been deployed on the client system for security reasons!
OpenVPN server uses the following ports:
- TCP 443
- TCP 943
- UDP 1194
These ports must all be enabled in port forwarding on your router, and, pointing to the IP address of your DietPi system.
Download the OpenVPN client programs (Windows):
URL = https://openvpn.net/community-downloads/
Download and install the installer that suites your Windows version.
Change the target address for the client file:
You will need to open the DietPi_OpenVPN_Client.ovpn
file in a text editor to change the target domain/ip address. This can be anything from a website address, No-IP domain name
, or IP address.
Change mywebsite.com. eg:
Connecting to your OpenVPN server (Windows):
Method 1 - Quick:
Simply right click the DietPi_OpenVPN_Client.ovpn
file and choose "Start OpenVPN on this config file".
Method 2 - GUI:
If you want to use the OpenVPN GUI, you will need to copy DietPi_OpenVPN_Client.ovpn
to the OpenVPN config location (eg: C:\Program Files\OpenVPN\config).
OpenVPN + Pi-hole:
To allow VPN clients accessing your local Pi-hole instance, you need to allow DNS requests from all network interfaces:
pihole -a -i local
>> Return to DietPi-Software List