Complete installation and configuration guide for Netureon
Update your system and install required packages:
# Update system packages
sudo apt update && sudo apt upgrade -y
# Install prerequisites
sudo apt install python3-dev postgresql postgresql-contrib libpq-dev git -y
# Start and enable PostgreSQL
sudo systemctl start postgresql
sudo systemctl enable postgresql
Download Netureon from GitHub:
# Clone the repository
git clone https://github.com/extremealexv/Netureon.git
cd Netureon
# Make setup script executable
chmod +x setup.sh
Execute the automated setup:
# Run the setup script
sudo ./setup.sh
# The script will:
# - Create virtual environment
# - Install Python dependencies
# - Setup PostgreSQL database
# - Configure systemd services
# - Create configuration files
Edit the configuration file:
# Edit configuration
sudo nano /opt/netureon/.env
# Configure database settings
DB_NAME=netureon
DB_USER=postgres
DB_PASSWORD=your_secure_password
DB_HOST=localhost
DB_PORT=5432
# Configure email alerts
SMTP_SERVER=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your_email@gmail.com
SMTP_PASSWORD=your_app_password
# Configure Telegram (optional)
TELEGRAM_BOT_TOKEN=your_bot_token
TELEGRAM_CHAT_ID=your_chat_id
Enable and start all Netureon services:
# Start services
sudo systemctl start netureon_web
sudo systemctl start netureon-alerts
sudo systemctl start netureon_scan.timer
# Enable auto-start on boot
sudo systemctl enable netureon_web
sudo systemctl enable netureon-alerts
sudo systemctl enable netureon_scan.timer
# Check service status
sudo systemctl status netureon*
Download and install required software:
Note: Make sure to add Python and Git to your system PATH during installation.
Open PowerShell as Administrator and run:
# Clone the repository
git clone https://github.com/extremealexv/Netureon.git
cd Netureon
# Set execution policy (if needed)
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Execute the PowerShell setup script:
# Run the setup script
.\setup.ps1
# The script will:
# - Create virtual environment
# - Install Python dependencies
# - Setup PostgreSQL database
# - Register Windows services
# - Create configuration files
Edit the configuration file:
# Open configuration file
notepad .env
# Configure the same settings as Linux:
# Database, SMTP, and Telegram settings
Start the Windows services:
# Start services
Start-Service Netureon
Start-Service NetureonAlerts
Start-Service NetureonWeb
# Set services to start automatically
Set-Service Netureon -StartupType Automatic
Set-Service NetureonAlerts -StartupType Automatic
# Check service status
Get-Service Netureon*
Configure SMTP settings for email alerts:
# Gmail Example
SMTP_SERVER=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your_email@gmail.com
SMTP_PASSWORD=your_app_password # Use App Password, not regular password
EMAIL_FROM=netureon@yourdomain.com
EMAIL_TO=admin@yourdomain.com
# Outlook Example
SMTP_SERVER=smtp-mail.outlook.com
SMTP_PORT=587
SMTP_USER=your_email@outlook.com
SMTP_PASSWORD=your_password
Set up Telegram bot for instant notifications:
/newbot
https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates
# Add to .env file
TELEGRAM_BOT_TOKEN=123456789:ABCdefGhIJKlmnoPQRstUVwxyz
TELEGRAM_CHAT_ID=123456789
PostgreSQL database configuration:
# Default configuration
DB_NAME=netureon
DB_USER=postgres
DB_PASSWORD=your_secure_password
DB_HOST=localhost
DB_PORT=5432
# For remote database
DB_HOST=192.168.1.100
DB_PORT=5432
Flask web application settings:
# Web server configuration
FLASK_SECRET_KEY=your_random_secret_key
FLASK_HOST=0.0.0.0 # Listen on all interfaces
FLASK_PORT=5000 # Web interface port
# For production, use a strong secret key:
# python -c "import secrets; print(secrets.token_hex(32))"
# Check network interfaces
ip addr show
# Test ARP scanning manually
sudo arp-scan --local
# Check service logs
sudo journalctl -u netureon_scan -f
# Test SMTP connection
python -c "
import smtplib
server = smtplib.SMTP('smtp.gmail.com', 587)
server.starttls()
server.login('user@gmail.com', 'password')
print('SMTP connection successful')
"
# Check alert service logs
sudo journalctl -u netureon-alerts -f
# Check PostgreSQL status
sudo systemctl status postgresql
# Test database connection
psql -U postgres -d netureon -c "SELECT version();"
# Check database logs
sudo tail -f /var/log/postgresql/postgresql-*.log
# Check if service is running
sudo systemctl status netureon_web
# Check port availability
sudo netstat -tlnp | grep :5000
# Test local access
curl http://localhost:5000
# Start all services
sudo systemctl start netureon_web netureon-alerts netureon_scan.timer
# Stop all services
sudo systemctl stop netureon_web netureon-alerts netureon_scan.timer
# Restart a service
sudo systemctl restart netureon_web
# Check service status
sudo systemctl status netureon*
# View service logs
sudo journalctl -u netureon_web -f
# Connect to database
sudo -u postgres psql netureon
# Backup database
pg_dump netureon > backup_$(date +%Y%m%d).sql
# Restore database
psql netureon < backup_20250923.sql
# Check database size
sudo -u postgres psql -c "SELECT pg_size_pretty(pg_database_size('netureon'));"
# View application logs
tail -f /var/log/netureon/app.log
# View scanner logs
tail -f /var/log/netureon/scanner.log
# View alert logs
tail -f /var/log/netureon/alerts.log
# Clear old logs (rotate)
sudo logrotate /etc/logrotate.d/netureon
# Start all services
Start-Service Netureon, NetureonAlerts, NetureonWeb
# Stop all services
Stop-Service Netureon, NetureonAlerts, NetureonWeb
# Restart a service
Restart-Service Netureon
# Check service status
Get-Service Netureon*
# View service events
Get-EventLog -LogName Application -Source Netureon
# Connect to database
psql -U postgres -d netureon
# Backup database
pg_dump -U postgres netureon > backup_%date:~-4,4%%date:~-10,2%%date:~-7,2%.sql
# Check database connection
Test-NetConnection localhost -Port 5432
# View application logs
Get-Content C:\Netureon\logs\app.log -Wait
# View Windows Event Logs
Get-WinEvent -FilterHashtable @{LogName='Application'; ProviderName='Netureon'}
# Clear old logs
Remove-Item C:\Netureon\logs\*.log -Recurse -Force