An open API service indexing awesome lists of open source software.

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

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