mirror of
https://github.com/CyberMind-FR/secubox-deb.git
synced 2026-07-30 07:05:20 +00:00
- Add LogsDirectory=secubox to systemd services for proper logging - Fix systemd service security sandboxing (remove PrivateTmp issues) - Replace text icons with emojis in menu.d JSON files - Fixes navbar display issues (overlapping text from icon names) Services updated: - secubox-system, secubox-hub, secubox-portal, secubox-watchdog - ~70 other services with LogsDirectory directive Menu icons fixed: - ipblock, interceptor, cookies, dns-provider, homeassistant, etc. - Changed from text strings to emojis for proper sidebar display Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| api | ||
| debian | ||
| menu.d | ||
| nginx | ||
| systemd | ||
| www/ipblock | ||
| README.md | ||
SecuBox IPBlock
IP blocklist management module for SecuBox-DEB.
Features
- Multiple Blocklist Sources: Spamhaus DROP/EDROP, Emerging Threats, Feodo Tracker, SSL Blacklist, TOR Exit Nodes, FireHOL, Blocklist.de
- Custom Rules: Manual IP blocking with optional expiration
- Whitelist Management: Exempt specific IPs from blocking
- nftables Integration: Uses nftables sets for efficient blocking
- Auto-Update: Scheduled blocklist updates
- Statistics: Track blocked packets and history
- Import/Export: Bulk IP list management
API Endpoints
All endpoints require JWT authentication except health checks.
Health & Status
GET /health- Health checkGET /status- Module status and nftables availability
Configuration
GET /config- Get current configurationPOST /config- Update configuration
Blocklist Sources
GET /lists- List active blocklist sourcesGET /lists/available- List available blocklist sourcesPOST /list/add- Add a blocklist sourceDELETE /list/{id}- Remove a blocklist sourcePOST /list/{id}/update- Update a specific blocklistPOST /lists/update-all- Update all enabled blocklists
Blocked IPs
GET /blocked- Get manually blocked IPsPOST /block- Block an IP addressDELETE /block/{ip}- Unblock an IP address
Whitelist
GET /whitelist- Get whitelisted IPsPOST /whitelist- Add IP to whitelistDELETE /whitelist/{ip}- Remove IP from whitelist
Statistics & History
GET /stats- Get block statisticsGET /history- Get block history
Import/Export
POST /import- Import IP listGET /export- Export blocked IPs
Apply Rules
POST /apply- Apply all rules to nftables
Configuration
Configuration is stored in /var/lib/secubox/ipblock/state.json:
{
"config": {
"auto_update_enabled": true,
"update_interval": 86400,
"log_blocked": true,
"block_action": "drop"
}
}
nftables Table
The module creates an inet ipblock table with:
blocked_v4/blocked_v6sets for blocked IPswhitelist_v4/whitelist_v6sets for whitelisted IPs- Input and output chains with priority -5
File Locations
- API:
/usr/lib/secubox/ipblock/ - Web UI:
/usr/share/secubox/www/ipblock/ - State:
/var/lib/secubox/ipblock/state.json - Lists:
/var/lib/secubox/ipblock/lists/ - History:
/var/lib/secubox/ipblock/history.json - nftables:
/etc/nftables.d/ipblock.nft
Systemd Service
systemctl status secubox-ipblock
systemctl restart secubox-ipblock
journalctl -u secubox-ipblock -f
Building
cd packages/secubox-ipblock
dpkg-buildpackage -us -uc -b
Author
Gerald KERMA devel@cybermind.fr https://cybermind.fr