Real-time Analysis
Monitors Apache access logs as requests happen with multi-site support and auto-discovery of log files.
JavaScript-free bot protection for LAMP stack
An open-source solution to block malicious bots by analyzing server log files, without client-side JavaScript. No additional software required - only Python 3 and PHP 8 standard libraries.
Immution is an open-source software designed to protect LAMP (Linux, Apache, MySQL, PHP) stack websites from malicious bots and automated attacks. Unlike other solutions, Immution works entirely server-side by analyzing log files, requiring no JavaScript execution on the client side.
Monitors Apache access logs as requests happen with multi-site support and auto-discovery of log files.
Only requires Python 3 and PHP 8 standard libraries. No additional software installation needed.
Features like sharded locks, write buffering, lazy writes, and bloom filters for maximum performance.
PHP performs O(1) lookups against a memory-mapped banned IP table for ultra-fast blocking.
Immution includes advanced optimizations that require no additional software - only Python 3 and PHP 8 standard libraries:
| Optimization | Description | Improvement |
|---|---|---|
| Sharded Locks | Divide cache into 16 shards with separate locks to reduce contention | 2-4x throughput |
| Write Buffering | Buffer writes in memory and flush periodically (every 50 updates or 2 seconds) | 10x fewer disk writes |
| Lazy Writes | Only write when score changes by ≥5 points or ban status changes | 5x fewer writes for legitimate traffic |
| Bloom Filter | Track "clean" IPs to skip file reads for legitimate traffic | 50% fewer file reads |
| Memory-Mapped Bans | PHP reads directly from mmap file - O(1) lookup without JSON parsing | 100x faster ban checks |
Original: 1000/sec
Optimized: 50-100/sec
Improvement: 10-20x fewer writes
Original: ~2ms
Optimized: ~0.02ms
Improvement: 100x faster
Original: High
Optimized: Low
Improvement: 4x throughput
┌─────────────────┐
│ Apache Logs │──── tail -f ────▶┌─────────────────┐
│ (multi-site) │ (threads) │ Python Daemon │
└─────────────────┘ │ (immution) │
└────────┬────────┘
│
▼
┌─────────────────┐
│ /dev/shm/ │
│ immution/ │
│ {ip}.txt │
└────────┬────────┘
│
┌─────────────────┐ │
│ HTTP Request │ │
└────────┬────────┘ │
│ │
▼ ▼
┌─────────────────┐ reads ┌─────────────────┐
│ gate.php │◀─────────────────│ IP Data File │
│ (auto_prepend) │ │ score, banned │
└────────┬────────┘ └─────────────────┘
│
├── banned=true ──▶ Log to CSV + Show 403 + exit()
│
└── banned=false ─▶ Continue to PHP script
sudo systemctl status immutionsudo journalctl -u immution -ftail -f /var/log/immution/blocked.csvls -la /dev/shm/immution/# Count blocks todaygrep "$(date +%Y-%m-%d)" /var/log/immution/blocked.csv | wc -l# Top 10 blocked IPscut -d',' -f2 /var/log/immution/blocked.csv | sort | uniq -c | sort -rn | head -10# Unblock a specific IPsudo rm /dev/shm/immution/1.2.3.4.txtThe Immution project is currently in testing phase. The source code will be publicly available on GitHub shortly.
Check back soon for access to the repository, documentation, and installation instructions.
Current Phase: Testing & Performance Optimization
Next Release: Public GitHub repository with full source code
License: MIT License - Open Source
Requirements: Python 3 + PHP 8 (standard libraries only)