g8998 / pivpn-web

MIT License
8 stars 3 forks source link

PiVPN Web (OpenVPN)

PiVPN Web is a service that allows you to manage users for PiVPN. With this service, you can create, remove, enable, disable users, as well as download or copy the configuration file for your PiVPN setup.

Functions

PiVPN Web provides the following functions:

Requirements

Installation

To install PiVPN Web, follow these steps:

  1. Install PiVPN (OpenVPN)
curl -L https://install.pivpn.io | bash
  1. Install Apache2 and PHP
sudo apt-get update && sudo apt-get install apache2 php git
  1. Edit de file /etc/apache2/apache2.conf and change the default user and group to your user and group.
User "your-username"
Group "your-group"
  1. Restart apache: sudo service apache2 restart
  2. Move to the apache directory: cd /var/www/html/
  3. Clone the repository: git clone https://github.com/g8998/pivpn-web.git
  4. Change permissions of the folder:
    sudo chown -R "your-username" pivpn-web/
    sudo chgrp -R "your-username" pivpn-web/
  5. If your user need the password for sudo commands create the file: /etc/sudoers.d/"your-username" with this content:
    "your-username" ALL=(ALL) NOPASSWD:/bin/cat,/bin/sed, /opt/pivpn/openvpn/*

Usage

To use PiVPN Web, follow these steps:

  1. Open your web browser and navigate to http://localhost/pivpn-web/ (or the appropriate IP address if running remotely).
  2. Sign in with your user's credentials.

That's it! You can now manage your PiVPN users easily with PiVPN Web. Enjoy!