OpenVPN System Based On User/Password Authentication with mysql &Day Control (lib-pam mysql) - Debian
System detail:
- OpenVPN Server, MySQL Server, IP = 1.1.1.1
- lib-pam MySQL
- 1 user - many connections
I. Install MySQL Server for User/Pass Authentication
1. Install MySQL Server
apt-get install mysql-server
2. Log in MySQL as root
mysql -uroot -p
3. Create the database 'openvpn'
CREATE DATABASE openvpn;
4. Create a MySQL user with username 'USERNAME' and password 'PASSWORD'
GRANT ALL ON openvpn.* TO 'USERNAME'@"%" IDENTIFIED BY 'PASSWORD';
5. Log out root user
exit;
6. Log in MySQL as new user 'USERNAME'
mysql -uUSERNAME -pPASSWORD
7. Switch database
USE openvpn;
8. Create user,...