https://github.com/dcc6fvo/php-unifi-8021x-log
Generates 802.1x unifi logs and sends alert emails to simultaneous users login
https://github.com/dcc6fvo/php-unifi-8021x-log
8021x ldap log logging mail php unifi
Last synced: 2 months ago
JSON representation
Generates 802.1x unifi logs and sends alert emails to simultaneous users login
- Host: GitHub
- URL: https://github.com/dcc6fvo/php-unifi-8021x-log
- Owner: dcc6fvo
- Created: 2023-06-15T16:06:26.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-15T18:59:47.000Z (about 3 years ago)
- Last Synced: 2025-03-27T17:49:35.698Z (over 1 year ago)
- Topics: 8021x, ldap, log, logging, mail, php, unifi
- Language: HTML
- Homepage:
- Size: 202 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# php-unifi-8021x-log
This is a php script that accesses data from the unifi controller through the "art of wifi" API, searching for connected users and thereby generating a log with information such as mac, ip, 802.1x address, among others. This kind of log is not automatically generated by the unifi controller and therefore the use of this script is justified.
The script also fetches the user's email by accessing the LDAP base that users are connected via wireless (unifi) and sends email to those logged in from more than 3 different devices at same time.
Please check and edit config.sample.php as needed. For future versions we can implement user logoff on older device if he authenticates on more than 3 devices at the same time.
### Contents
* [Prerequisites](#prerequisites)
* [Install](#install)
* [Running](#running)
### Prerequisites
- Art of Wifi from https://github.com/Art-of-WiFi/UniFi-API-client
- PHP Mailer from https://github.com/PHPMailer/PHPMailer
- PHP >= 7
- Linux/debian libs:
- php-ldap
- php-curl
### Install
1) git clone https://github.com/dcc6fvo/php-unifi-8021x-log
2) cp config.sample.php config.php
3) edit config.php
### Running
php unifi-8021x-log.php