Security

Post-installation security

1. Remove the install directory:

rm -rf /path/to/tirreno/install/

The install directory contains setup scripts that could be exploited if left accessible.

2. Set proper file permissions:

# Restrict config directory
chmod 750 config/
chmod 640 config/*.ini

# Restrict sensitive files
chmod 640 composer.json composer.lock
chmod 640 .htaccess

# Ensure logs are not world-readable
chmod 750 assets/logs/

# Make rules directories writable only by web server
chown -R www-data:www-data assets/rules/
chmod 755 assets/rules/core/ assets/rules/custom/

3. Verify .htaccess protection: Ensure your Apache configuration allows .htaccess overrides:

<Directory /path/to/tirreno>
    AllowOverride All
    Require all granted
</Directory>

4. Verify settings file is inaccessible:

# Should return 403 Forbidden or 404 Not Found
curl -I https://your-tirreno.com/config/local/config.local.ini

Network security

<Location /sensor/>
    Require ip 10.0.0.0/8
    Require ip 192.168.0.0/16
</Location>

Access control

1. Admin account security:

2. Session management:

Monitoring and logging

1. Application log files:

tirreno writes logs to the assets/logs/ directory:

Log fileDescription
error.logApplication errors and exceptions
blacklist.logBlacklist events — records when users are automatically blacklisted by rules
sql.logSQL queries (disabled by default, enable with PRINT_SQL_LOG_AFTER_EACH_SCRIPT_CALL = 1)

Monitor blacklist.log to track automatic fraud detection:

tail -f assets/logs/blacklist.log

2. Logbook (UI):

3. Monitor for suspicious activity:

4. Log retention:

Security checklist

Use this checklist for production deployments:

________________________________________________________________________________