mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
Doc
This commit is contained in:
40
README.md
40
README.md
@@ -38,31 +38,31 @@ The system consists of two parts:
|
||||
|
||||
### Back
|
||||
In charge of:
|
||||
- Scan the network searching connected devices using the scanning methods
|
||||
described
|
||||
- Store the information in the DB
|
||||
- Report the changes detected by e-mail
|
||||
- Scan the network searching connected devices using the scanning methods
|
||||
described
|
||||
- Store the information in the DB
|
||||
- Report the changes detected by e-mail
|
||||
|
||||
| ![Report 1][report1] | ![Report 2][report2] |
|
||||
| -------------------- | -------------------- |
|
||||
| ![Report 1][report1] | ![Report 2][report2] |
|
||||
| -------------------- | -------------------- |
|
||||
|
||||
### Front
|
||||
A web frontal that allows:
|
||||
- Manage the devices inventory and the characteristics
|
||||
- Display in a visual way all the information collected by the back
|
||||
- Sessions
|
||||
- Connected devices
|
||||
- Favorites
|
||||
- Events
|
||||
- Presence
|
||||
- Concurrent devices
|
||||
- Down alerts
|
||||
- IP's
|
||||
- ...
|
||||
- Manage the devices inventory and the characteristics
|
||||
- Display in a visual way all the information collected by the back
|
||||
- Sessions
|
||||
- Connected devices
|
||||
- Favorites
|
||||
- Events
|
||||
- Presence
|
||||
- Concurrent devices
|
||||
- Down alerts
|
||||
- IP's
|
||||
- ...
|
||||
|
||||
| ![Screen 1][screen1] | ![Screen 2][screen2] |
|
||||
| -------------------- | -------------------- |
|
||||
| ![Screen 3][screen3] | ![Screen 4][screen4] |
|
||||
| ![Screen 1][screen1] | ![Screen 2][screen2] |
|
||||
| -------------------- | -------------------- |
|
||||
| ![Screen 3][screen3] | ![Screen 4][screen4] |
|
||||
|
||||
|
||||
# Installation
|
||||
|
||||
@@ -29,29 +29,29 @@ Estimated time: 20'
|
||||
3 - Start the raspberry
|
||||
|
||||
4 - Login to the system with pi user
|
||||
```
|
||||
```
|
||||
user: pi
|
||||
password: raspberry
|
||||
```
|
||||
```
|
||||
|
||||
5 - Change the default password of pi user
|
||||
```
|
||||
```
|
||||
passwd
|
||||
```
|
||||
```
|
||||
|
||||
6 - Setup the basic configuration
|
||||
```
|
||||
```
|
||||
sudo raspi-config
|
||||
```
|
||||
```
|
||||
|
||||
7 - Optionally, configure a static IP in raspi-config
|
||||
|
||||
8 - Update the OS
|
||||
```
|
||||
```
|
||||
sudo apt-get update
|
||||
sudo apt-get upgrade
|
||||
sudo reboot
|
||||
```
|
||||
```
|
||||
|
||||
## Pi-hole Setup
|
||||
<!--- --------------------------------------------------------------------- --->
|
||||
@@ -63,16 +63,16 @@ Estimated time: 20'
|
||||
2 - Login to the system with pi user
|
||||
|
||||
3 - Install Pi-hole
|
||||
```
|
||||
```
|
||||
curl -sSL https://install.pi-hole.net | bash
|
||||
```
|
||||
```
|
||||
- Mark "Install web admin interface"
|
||||
- Mark "Install web server lighttpd"
|
||||
|
||||
4 - Configure Pi-hole admin password
|
||||
```
|
||||
```
|
||||
pihole -a -p PASSWORD
|
||||
```
|
||||
```
|
||||
|
||||
5 - Connect to web admin panel
|
||||
- http://192.168.1.x/admin/
|
||||
@@ -97,41 +97,41 @@ Estimated time: 20'
|
||||
## arp-scan & Python
|
||||
<!--- --------------------------------------------------------------------- --->
|
||||
1 - Install arp-scan utility and test
|
||||
```
|
||||
```
|
||||
sudo apt-get install arp-scan
|
||||
sudo arp-scan -l
|
||||
```
|
||||
```
|
||||
|
||||
2 - Install Python & packages
|
||||
```
|
||||
```
|
||||
sudo apt-get install python-setuptools
|
||||
sudo apt install python-pip
|
||||
|
||||
pip install netaddr
|
||||
pip install dpkt
|
||||
pip install MacLookup
|
||||
```
|
||||
```
|
||||
|
||||
|
||||
## Pi.Alert
|
||||
<!--- --------------------------------------------------------------------- --->
|
||||
1- Download Pi.Alert and uncompress
|
||||
```
|
||||
```
|
||||
curl -LO https://github.com/pucherot/Pi.Alert/raw/main/install/pialert_latest.tar
|
||||
tar xvf pialert_latest.tar
|
||||
rm pialert_latest.tar
|
||||
```
|
||||
```
|
||||
|
||||
2 - Public the front portal
|
||||
```
|
||||
```
|
||||
sudo ln -s /home/pi/pialert/front /var/www/html/pialert
|
||||
```
|
||||
```
|
||||
|
||||
3 - Update lighttpd config
|
||||
```
|
||||
```
|
||||
sudo sh -c "printf '\n\n\$HTTP[\"host\"] == \"pi.alert\" {\n server.document-root = \"/var/www/html/pialert/\"\n}\n' >> /etc/lighttpd/external.conf"
|
||||
sudo /etc/init.d/lighttpd restart
|
||||
```
|
||||
```
|
||||
|
||||
4 - If you want to use email reporting with gmail
|
||||
- Go to your Google Account https://myaccount.google.com/
|
||||
@@ -141,53 +141,53 @@ Estimated time: 20'
|
||||
- Click Save button
|
||||
|
||||
5 - Config Pialert parameters
|
||||
```
|
||||
```
|
||||
nano ~/pialert/back/pialert.conf
|
||||
```
|
||||
```
|
||||
- If you want to use email reporting, configure this parameters
|
||||
```
|
||||
```ini
|
||||
REPORT_MAIL = True
|
||||
SMTP_USER = 'user@gmail.com'
|
||||
SMTP_PASS = 'password'
|
||||
REPORT_TO = 'user@gmail.com'
|
||||
```
|
||||
```
|
||||
|
||||
- If you want to update your Dynamic DNS, configure this parameters
|
||||
```
|
||||
```ini
|
||||
DDNS_ACTIVE = True
|
||||
DDNS_DOMAIN = 'your_domain.freeddns.org'
|
||||
DDNS_USER = 'dynu_user'
|
||||
DDNS_PASSWORD = 'A0000000B0000000C0000000D0000000'
|
||||
DDNS_UPDATE_URL = 'https://api.dynu.com/nic/update?'
|
||||
```
|
||||
```
|
||||
|
||||
- If you have installed Pi.hole and DHCP, activate this parameters
|
||||
```
|
||||
```ini
|
||||
PIHOLE_ACTIVE = True
|
||||
DHCP_ACTIVE = True
|
||||
```
|
||||
```
|
||||
|
||||
6 - Update vendors DB
|
||||
```
|
||||
```
|
||||
python ~/pialert/back/pialert.py update_vendors
|
||||
```
|
||||
```
|
||||
|
||||
7 - Test Pi.Alert Scan
|
||||
```
|
||||
```
|
||||
python ~/pialert/back/pialert.py internet_IP
|
||||
python ~/pialert/back/pialert.py 1
|
||||
```
|
||||
```
|
||||
|
||||
8 - Add crontab jobs
|
||||
```
|
||||
```
|
||||
(crontab -l 2>/dev/null; cat ~/pialert/back/pialert.cron) | crontab -
|
||||
```
|
||||
```
|
||||
|
||||
9 - Add permissions to the web-server user
|
||||
```
|
||||
```
|
||||
sudo chgrp -R www-data ~/pialert/back ~/pialert/back/pialert.conf ~/pialert/front ~/pialert/db
|
||||
chmod -R 770 ~/pialert/back ~/pialert/back/pialert.conf ~/pialert/front ~/pialert/db
|
||||
```
|
||||
```
|
||||
|
||||
10 - Check DNS record por pi.alert (explained in point 7 of Pi.hole installing)
|
||||
- Add pi.alert DNS Record
|
||||
|
||||
Reference in New Issue
Block a user