An easy way to set up a VPN server on Debian is with PiVPN. PiVPN is an installer and wrapper for OpenVPN. It creates simple commands for you to control your VPN Server.
First, create a new user. This user can have any name, but for this example we will use "
Run the command found on the PiVPN website as root.
curl -L https://install.pivpn.io | bash
While it is installing you will see a few prompts, and for most users you should keep the settings to the default. It will automatically find your new user and add it as the default storage for the VPN profiles.
Now that the installation is complete, you can add and remove VPN profiles. To add a profile run the following.
Enter the name and password of the profile you wish to have. The profile is then stored in the home directory of the "
vpn" user. You could also add a user without a password.
pivpn add nopass
If you wish to revoke a user, use the following command, replacing
example with the user to be removed.
pivpn revoke example
To connect to the VPN, all you need is the
*.ovpn files stored in
/home/vpn/ovpns. Copy these to your clients of choice using the method of your choice, install the OpenVPN client and import the file.