Commit Graph

1214 Commits

Author SHA1 Message Date
3150c65e99 feat(peertube): Add yt-dlp video import to LuCI dashboard
- Install yt-dlp in PeerTube LXC container for video downloads
- Add RPCD methods: import_video, import_status
- Add UI section with URL input and download button
- Support YouTube, Vimeo, and 1000+ video sites
- Download videos to import folder for PeerTube admin upload
- Show download status and video count

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 16:20:50 +01:00
75b85080fa feat(mitmproxy): Add WAF Filters UI to LuCI dashboard
- Add new WAF Filters tab displaying 10 detection categories
- Categories: sqli, xss, lfi, rce, cve_2024, scanners, webmail, api_abuse, nextcloud, roundcube
- Toggle enable/disable per category with live updates
- Expandable rules tables with patterns, descriptions, CVE links
- Summary stats: total categories, active filters, rule count
- RPCD methods: get_waf_rules, toggle_waf_category
- Update menu entry and ACL permissions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 16:02:58 +01:00
00f584e6a0 docs: Bump version to v0.21.0 in WIP.md
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 15:50:21 +01:00
c4669fafc9 docs: Mailserver migration Alpine → Debian 12
- Replaced unstable Alpine container with Debian 12 Bookworm
- Fixed persistent Dovecot permission issues (UID/GID mismatch)
- Postfix + Dovecot properly configured for Debian
- Mail data and SSL certificates preserved
- Webmail now working reliably

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 15:49:50 +01:00
edbd58d95d feat(security): Add ndpid to security dashboard, Streamlit/MetaBlogizer to apps
Security KISS Dashboard:
- Add ndpid (nDPI daemon) to RPCD status method
- Add ndpid to services monitoring array (6 services total)

APPS Portal:
- Add Streamlit to Services category (Python data apps)
- Add MetaBlogizer to Services category (AI blog generation)

Also includes secubox-cloner enhancements from earlier session.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 15:29:54 +01:00
dd1e7cbbde feat(security-threats): Add Wazuh SIEM to security status bar
- Add wazuh_running status check to RPCD handler
- Display Wazuh alongside CrowdSec, netifyd, mitmproxy in dashboard

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 14:57:46 +01:00
1945c5b5c3 docs: Update tracking files for Nextcloud LXC enhancement
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 14:46:38 +01:00
4d193c5e48 feat(nextcloud): Enhance LXC package with storage stats and backup management
- Update Nextcloud version to 31.0.5
- Add auto-start (lxc.start.auto) for boot persistence
- Add memory limit cgroup configuration
- Fix nginx /apps/ path for static assets (CSS, JS, SVG)
- Add Storage tab with disk usage visualization
- Add delete backup functionality
- Add RPCD methods: uninstall, get_storage, delete_backup
- Update ACL permissions for new methods
- Rewrite README.md with LXC architecture docs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 14:41:04 +01:00
92c3a4df46 docs: Update tracking files for luci-app-webradio addition
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 14:35:19 +01:00
418e99e481 feat(webradio): Add luci-app-webradio LuCI interface
Complete WebRadio management interface for OpenWrt:
- Dashboard with server status, listeners, now playing
- Icecast/Ezstream server configuration
- Playlist management with shuffle/upload
- Programming grid scheduler with jingle support
- Live audio input via DarkIce (ALSA)
- Security: SSL/TLS, rate limiting, CrowdSec integration

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 14:25:31 +01:00
d02f65118e docs: Update HISTORY.md for v0.20.6 release
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 07:37:19 +01:00
d03608e3e3 docs: Update WIP.md for v0.20.6 release
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 07:36:20 +01:00
a47800df6f fix(dns-master): Make bump_serial POSIX-compatible
Replace bash-specific substring syntax with POSIX alternatives:
- ${var:0:8} -> cut -c1-8
- ${var:8:2} -> cut -c9-10
- $((10#$var + 1)) -> expr

This fixes "arithmetic syntax error" when running via RPCD (busybox ash).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 07:34:47 +01:00
f95b381077 fix(mailserver): Fix dovecot users file permissions in user_add/passwd
Both user_add and user_passwd functions now set correct permissions
(644 root:dovecot) after updating /etc/dovecot/users inside the
container. This prevents "Permission denied" errors on authentication
after adding users or changing passwords.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 07:30:49 +01:00
3aacabd5c1 fix(mailserver): Fix dovecot users file permissions after add-user
Ensure /etc/dovecot/users has 644 permissions and root:dovecot ownership
after adding a user. Without this, dovecot cannot read the passwd-file
and authentication fails with "Permission denied".

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 07:26:46 +01:00
95e14c183b fix(mailserver): Improve Dovecot startup permissions
- Create login/token-login/empty directories with correct ownership
- Set proper permissions for dovenull user on login directories
- Remove stale auth-token-secret.dat on startup (prevents "compromised token" errors)
- Increase sleep time after dovecot start for socket creation
- Fix permissions again after socket creation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 07:11:22 +01:00
8412639a8c fix(nextcloud): Add cron setup for background jobs
Configure Nextcloud cron job (every 5 minutes) in container startup
script for proper background task execution (file scanning, cleanup,
notifications, etc.)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 03:50:29 +01:00
aa86161af0 fix(nextcloud): Remove /apps/ location block breaking static files
The ^~ /apps/ location was taking precedence over static file regex
locations, causing SVG icons to return 404. The root location's
rewrite to index.php already handles app routing correctly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 03:49:01 +01:00
fe8c3aaf5e fix(nextcloud): Add /apps/ nginx location to fix 403 errors
The /apps/dashboard/ and other app paths were returning 403 Forbidden
because nginx was matching the directory via try_files before routing
to PHP. Added explicit location ^~ /apps/ to rewrite to index.php.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 03:44:24 +01:00
aecd4ee4f6 docs: Update tracking files for mailctl firewall & Nextcloud 31.0.14
- Nextcloud upgraded from 30.0.17 to 31.0.14
- mailctl firewall_setup now persists UCI rules for mail ports
- All apps updated (mail, tasks, external, spreed/Talk)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 23:59:16 +01:00
f5d2122fd3 fix(mailserver): Ensure dovecot users file is readable
Add permission fix for /etc/dovecot/users in startup script.
Without this, dovecot auth fails with "Permission denied" when
trying to read the passwd-file for LMTP delivery.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 16:02:27 +01:00
a0fc2cee62 fix(mailserver): Add UCI firewall rules for mail ports
The firewall-setup command now adds:
- Input rules for ports 25, 143, 465, 587, 993 (accept from WAN)
- Forward rules for mail ports (WAN -> LAN mailserver)
- DNAT rules in firewall.user (excluding LAN subnet)

This ensures nftables input_wan and forward_wan chains allow
mail traffic to reach the mailserver container.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 15:56:31 +01:00
f6f4176170 docs: Update tracking files for mail reception fix
- Mark "Inbound Port 25 Blocked" as RESOLVED
- Document nftables and postfix lmdb fixes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 15:53:06 +01:00
4154913810 fix(mailserver): Use lmdb instead of hash for postfix maps
Alpine Linux uses LMDB instead of Berkeley DB hash format.
Changed virtual_mailbox_maps from hash: to lmdb: prefix.

Also fixes:
- nftables forward_wan missing port 25 accept rule
- nftables input_wan missing port 25 accept rule
- gk2@secubox.in missing from vmailbox

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 15:51:48 +01:00
19406e128c fix(mailserver): Complete dovecot permission fixes
- Add dovecot run directory permission setup
- Add dovenull to dovecot group (fixes login directory access)
- Update HISTORY.md with changes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 15:43:46 +01:00
c379aee903 fix(mailserver): Add dovecot run directory permission fix
Fix anvil-auth-penalty socket permission issues that caused
authentication failures. Ensures /run/dovecot has correct ownership
before and after dovecot starts.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 15:26:43 +01:00
ca6d4fa160 docs: Update tracking files for Nextcloud and WAF fixes
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 15:12:15 +01:00
4bd0c09b2e feat(nextcloud): Add user management and password reset
- Add list_users RPCD method to list Nextcloud users via OCC
- Add reset_password RPCD method for password reset via OCC
- Add Users tab in LuCI dashboard with user list
- Add password reset modal with confirmation
- Parse Nextcloud user:displayname JSON format

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 15:10:35 +01:00
31aea08b0c docs: Update tracking files for mailserver password fix
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 14:00:43 +01:00
778ab4a1e8 fix(mailserver): Fix password reset hash corruption
- Use printf instead of echo to preserve $6$ hash prefix
- Write dovecot entry to temp file to avoid shell expansion
- Use correct uid:gid 102:105 for vmail user
- Add userdb_mail field to dovecot passwd format
- Use /var/mail path to match container layout

The SHA512-CRYPT hash ($6$...) was being corrupted when passed
through nested shell commands - the $6$ was interpreted as a
shell variable and removed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 13:59:06 +01:00
7151bc6138 feat(mailserver): Add mail autoconfig and user repair features
Autoconfig:
- Created config-v1.1.xml (Thunderbird), autodiscover.xml (Outlook),
  email.mobileconfig (Apple) for automatic mail client configuration
- Added uhttpd instance on port 8025 to serve autoconfig files
- Added HAProxy backends with waf_bypass for autoconfig domains
- Added mailctl autoconfig-setup and autoconfig-status commands

LuCI Mailserver:
- Added user_repair method for mailbox repair (doveadm force-resync)
- Added repair button to user actions in overview

LuCI Nextcloud:
- Added list_users method to list Nextcloud users
- Added reset_password method for password reset via OCC

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 13:26:23 +01:00
856a167ad4 fix(mailserver): Add firewall-setup command excluding LAN clients
- Add mailctl firewall-setup command to configure mail port forwarding
- Add mailctl firewall-clear command to remove mail firewall rules
- Firewall rules now use "! -s LAN_SUBNET" to exclude LAN clients
- LAN clients can reach external mail servers (OVH, Gmail, etc.)
- WAN traffic on mail ports redirected to local mailserver

Fixes SSL certificate errors when LAN clients connect to external IMAP/SMTP

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 13:02:45 +01:00
a461e0e4d6 docs: Update tracking files for mailserver alias feature
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 12:54:04 +01:00
23c38cd2f1 feat(mailserver): Add alias management via ubus
- Fix alias_add RPCD to read JSON from stdin (ubus compatibility)
- Add alias_del function to users.sh
- Add alias del command to mailctl
- Add alias_del RPCD method

Tested: alias_add, alias_list, alias_del all work via ubus call

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 12:38:55 +01:00
67441bd97b feat(nextcloud): Add tabs to KISS sidebar navigation
Add Nextcloud Overview and Settings tabs to kiss-theme sidebar for
consistent navigation across all SecuBox apps.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 12:31:27 +01:00
7bfec387dc feat(hexojs): Add tabs to KISS sidebar navigation
- Add HexoJS tabs (Overview, Posts, Editor, Media, Deploy, Sync, Theme,
  Settings) to kiss-theme.js nav config
- Remove duplicate inline tabs from overview.js
- Tabs now appear in sidebar when HexoJS is selected

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 10:43:27 +01:00
1585975e90 refactor(hexojs): Use shared kiss-theme module
Replace inline CSS with shared secubox/kiss-theme module for simpler,
faster, more efficient rendering. Code reduced from 320 to 188 lines.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 10:36:56 +01:00
832afe9851 feat(hexojs): KISS-style dashboard with inline CSS
Completely rewrote overview.js with self-contained inline CSS following
the KISS design pattern. Dark theme with stats grid, quick actions,
instance cards with status badges, and clean backups table.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 10:34:22 +01:00
44178cbbf5 fix(hexojs): Fix RPC expect unwrapping in dashboard load function
The listInstances and listBackups RPC declarations use expect which
unwraps the response array directly. Changed results[0].instances to
results[0] and results[3].backups to results[3].

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 10:30:59 +01:00
c2cd204ea9 feat(hexojs): Multi-instance enhancement with backup/restore and Git integration
- Add backup/restore commands to hexoctl (backup, restore, backup list/delete)
- Add GitHub clone support (hexoctl github clone <url> [instance] [branch])
- Add Gitea push support (hexoctl gitea push [instance] [message])
- Add quick-publish command (clean + build + publish in one step)
- Add 15 new RPCD methods for instance/backup/git management
- Rewrite LuCI dashboard with KISS theme:
  - Multi-instance management with status cards
  - Instance controls: start/stop, quick publish, backup, editor, preview
  - GitHub/Gitea clone modals
  - Backup table with restore/delete
  - Stats grid: instances, posts, drafts, backups
- Update API with 12 new RPC declarations
- Update ACL with new permissions

Also includes DNS Master app created in previous session.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 10:26:55 +01:00
16ed7e2d7a fix(mailserver): Add IMAP port 143 to status check
- Added port 143 to RPCD port detection list
- Fixed KISS nav path for Nextcloud (admin/secubox/services/nextcloud)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 09:56:51 +01:00
efa74990be feat(mailserver): KISS theme enhancement for LuCI dashboard
- Complete rewrite of overview.js with full KISS theme styling
- 4-column stats grid (Status, Users, Storage, SSL)
- Port status cards with visual indicators
- Two-column layout: Users + Aliases tables
- Webmail card with status badge and quick actions
- Connection info panel with server details
- Live polling with 10s refresh
- Added fix_ports, alias_del methods to ACL
- Added Mail Server + Nextcloud to KISS nav sidebar

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 09:52:19 +01:00
1d3fb1ed7c docs: Update tracking files for Nextcloud SSL, WAF rules, mail autoconfig
- Nextcloud production deploy with HAProxy SSL
- WAF rules for Nextcloud & Roundcube CVEs
- Mail client autoconfig DNS and XML endpoint

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 09:01:11 +01:00
2bc2eac994 fix(nextcloud): Fix nginx config for Nextcloud app routing
- Change location / from try_files to rewrite for proper app URL handling
- Fixes 403 errors when accessing /apps/* URLs after authentication
- All URLs now properly route through index.php

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 08:17:49 +01:00
5b6bf8560a fix(nextcloud): Use configurable HTTP port and correct PHP-FPM socket
- Change nginx to listen on ${NEXTCLOUD_HTTP_PORT:-8080} instead of hardcoded port 80
- Fix PHP-FPM socket path to use detected PHP version (php${PHP_VERSION}-fpm.sock)
- Avoids port conflict with HAProxy on port 80 when using host networking

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 08:10:03 +01:00
b78ea3b683 fix(nextcloud): Fix LXC rootfs download and chroot mounts
- Parse HTML directory listing instead of non-existent index.json
- URL-encode colon in date path for LXC image server
- Add mount_chroot_fs/umount_chroot_fs helpers for proper chroot
- Mount /dev, /dev/pts, /proc, /sys before running apt
- Remove php-smbclient (not in base repos)
- Install gnupg/gpgv first for apt verification

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 08:02:01 +01:00
09b40c3b88 feat(nextcloud): Migrate to LXC with full-stack enhancement
- Migrate from Docker to Debian 12 LXC container
- Full stack: Nginx, MariaDB, Redis, PHP 8.2-FPM, Nextcloud
- Rewrite nextcloudctl CLI with install/backup/restore/ssl/occ commands
- New UCI config schema: main, db, redis, ssl, backup sections
- Enhanced RPCD backend with 15 methods
- KISS dashboard with Overview/Backups/SSL/Logs tabs
- Updated dependencies for LXC packages
- SecuBox menu path integration

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 07:49:17 +01:00
59d0e89a8c feat(gk2hub): Use subdomain URLs instead of redirect paths
- Infrastructure: media, localai, webmail, feed, tube, social, wazuh
- MetaBlogizer: HAProxy vhost lookup for automatic subdomain detection
- Added icons for new service types (tube, social, wazuh, etc.)
- 67 services now display with proper subdomain URLs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 17:01:54 +01:00
491120609b docs: Update tracking files for mitmproxy WAF dashboard fix
- Added mitmproxy WAF data path fix to WIP.md and HISTORY.md
- RPCD now reads from /srv/mitmproxy-in for correct threat stats

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 10:35:01 +01:00
42d85c4d0f fix(mitmproxy): Use WAF input data path for threat stats
- Changed RPCD handler to read from /srv/mitmproxy-in (WAF input)
- Previously read from /srv/mitmproxy which had no threat data
- Fixed threats_today, alerts, autobans stats
- Check mitmproxy-in and mitmproxy-out containers for running status

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 10:30:21 +01:00