# KingDezigns Network Documentation Index Last Updated: 2026-07-25 This index provides a structured overview of all VLANs, servers, and firewall policies in the KingDezigns network. Each section links to its own dedicated Markdown file for clarity and modularity. --- # ๐Ÿ“ VLAN Documentation ## ๐Ÿ”ง Core VLANs - [VLAN 1 โ€” Infrastructure](vlan1_infrastructure.md) - [VLAN 10 โ€” Management](vlan10_management.md) ## ๐Ÿง‘โ€๐Ÿ’ป Trusted User VLANs - [VLAN 20 โ€” Trusted Devices](vlan20_trusted.md) ## ๐Ÿ  Smart Home & Guest VLANs - [VLAN 30 โ€” IoT](vlan30_iot.md) - [VLAN 40 โ€” Guest](vlan40_guest.md) ## ๐Ÿงช Server & Lab VLAN - [VLAN 50 โ€” Lab / Servers](vlan50_lab.md) --- # ๐Ÿ–ฅ๏ธ Server Documentation ## Core Services - [Home Assistant Server](server_homeassistant.md) - [NAS08 โ€” Pi-hole, Nextcloud (+ ONLYOFFICE/Collabora), Vaultwarden, STOCKPROXY](server_nas08.md) - [NAS16 โ€” LAMP Stack, MariaDB, Webmin](server_nas16.md) - [PLEX32 โ€” Plex Media Server + Tautulli](server_plex32.md) ## Network Hardware - [UCG Gateway Max](server_ucg.md) --- # ๐Ÿ”ฅ Firewall Policies - [Firewall Policies Overview](firewall_policies.md) --- # ๐Ÿ›ก๏ธ Security Stack ## Intrusion Prevention - **CrowdSec** โ€” installed on HAS as a native HA add-on - Agent reads NPM, HA, and SSH logs via journald - 60 active detection scenarios - Community blocklist updates every 2 hours - Firewall Bouncer enforces bans at nftables level - Email alerts on every ban decision - All LAN VLANs whitelisted โ€” internal IPs can never be banned - See [Home Assistant Server](server_homeassistant.md) for full configuration details ## Perimeter Defense (per server) - **Fail2Ban** โ€” NAS16 (active), PLEX32 (active), NAS08 (recommended) - `ignoreip` includes `192.168.150.0/24` to prevent HAS proxy IP from being banned - Real IP forwarding configured on NAS16 (nginx + Apache) and NAS08 ## DNS-level Protection - **Pi-hole** โ€” NAS08 (192.168.150.35) - Blocks ads, trackers, and malicious domains for all VLANs - All VLANs forced to use Pi-hole via global firewall rule 20001 - **Local DNS overrides required** for any internally-hosted service accessed by its public hostname from within the LAN (e.g. `cloud.kingdezigns.com` โ†’ `192.168.150.30`), to avoid NAT hairpin failures. See `server_nas08.md` ONLYOFFICE section for a documented example and fix. --- # ๐ŸŒ Network Architecture Overview This documentation set is designed around: - Clear segmentation - Explicit inter-VLAN access - Isolation of untrusted devices - Preservation of Home Assistant functionality - AI-friendly structure and formatting - Layered security โ€” DNS filtering, intrusion prevention, firewall enforcement ## Security Layer Model ``` Internet โ†“ UCG Max โ€” firewall, VLAN segmentation, geo-blocking (future) โ†“ CrowdSec Firewall Bouncer โ€” nftables ban enforcement โ†“ NPM on HAS โ€” single ingress, SSL termination โ†“ CrowdSec Agent โ€” log analysis, attack detection โ†“ Backend Services (NAS08, NAS16, PLEX32) โ†“ Fail2Ban โ€” last-line brute force protection โ†‘ Pi-hole โ€” DNS-level ad/tracker/malware blocking (all VLANs) ``` --- # ๐Ÿ”‘ SSH Key Authentication Map SSH key authentication is configured between the following machines โ€” no passwords required: | From | To | Purpose | |------|----|---------| | KingDezigns001 | PLEX32 (192.168.150.45) | Remote launcher script | | KingDezigns001 | NAS08 (192.168.150.35) | Direct SSH access | | KingDezigns001 | NAS16 (192.168.150.40) | Direct SSH access | | PLEX32 | NAS08 (192.168.150.35) | Backup script disk stats via SSH | Key type: ED25519. Keys generated per machine โ€” not shared. --- # ๐Ÿ–ฅ๏ธ KingDezigns001 โ€” Admin Workstation Tools KingDezigns001 is the primary Linux administrative workstation on VLAN 20 (Trusted). ## Remote Launcher A menu-driven launcher script provides one-click access to run scripts on PLEX32: - **Script:** `~/scripts/plex32_launcher.sh` - **Desktop shortcut:** `~/Desktop/PLEX32-Launcher.desktop` - **Terminal:** gnome-terminal ### Menu Options | Option | Runs on | Script | |--------|---------|--------| | 1) Update Check | PLEX32 | `/usr/scripts/plex32/plex32_update_check.sh` | | 2) Health Report | PLEX32 | `/usr/scripts/plex32/plex32_health_report.sh` | | 3) Plex32 Backup | PLEX32 | `/usr/scripts/plex32/plex32_backup.sh` | --- # ๐Ÿง  Notes for AI Systems - Each file is self-contained and structured consistently. - Section headers follow a predictable pattern for easy parsing. - No duplicated firewall rules โ€” all rules live in `firewall_policies.md`. - CrowdSec configuration lives entirely on HAS โ€” see `server_homeassistant.md`. - VLAN files contain: - Purpose - Access types - Subnet - Expected devices - Security rules - AI summary - Plex Media Server migrated from NAS08 to PLEX32 (dedicated Dell Wyse 5070) on 2026-06-18 โ€” see `server_plex32.md`. - PLEX32 now runs Plex + Tautulli with Intel Quick Sync hardware transcoding โ€” optimized 2026-06-20. - KingDezigns001 has SSH keys to all VLAN 50 servers โ€” passwordless access for all admin tasks. - PLEX32 has SSH key to NAS08 โ€” required for backup script to fetch disk stats. - **NAS08 Nextcloud update check** runs daily at 7AM โ€” `/usr/scripts/omv/nextcloud_update_check.sh` โ€” emails HTML report with copy-paste `occ` commands. Never use the browser UI for Nextcloud app updates (causes Apache segfault โ†’ maintenance mode deadlock). - **NAS08 Nextcloud update check โ€” core-update false negative fixed (2026-07-25):** the script previously checked app updates only (`occ app:update`) and had no code path for Nextcloud core/server releases, so it silently missed a core update (34.0.1 โ†’ 34.0.2) and emailed a false "up to date" report. Fixed by adding a core check via `occ update:check`, correcting the emailed Compose commands to the real path (`/kingdezignsnas/Docker/Compose/nextcloud/`, root-only, non-default filenames requiring `-f nextcloud.yml -f compose.override.yml`), and fixing a bash quoting bug that made emailed multi-line commands unreadable. Also documented: the official Nextcloud Docker image auto-upgrades on container restart via its own entrypoint โ€” checking version status immediately after `up -d` can race that process and show a stale version for ~30 seconds. Full detail in `server_nas08.md`. - **NAS08 Nextcloud Office editing** uses ONLYOFFICE Document Server (free Community Edition) as of 2026-07-18. Only one Office integration app should ever be enabled at a time (exception: the Collabora trial below, run as a time-boxed disable/enable swap, never simultaneous). Requires a Pi-hole local DNS override for `cloud.kingdezigns.com`, `ALLOW_PRIVATE_IP_ADDRESS=true` on the container, and matching JWT secrets between Nextcloud and the container. Full details and troubleshooting history in `server_nas08.md`. - **NAS08 Collabora Online trial (2026-07-21, ongoing):** A second Office editor, Collabora Online (CODE), was deployed as a standalone Docker container (`collabora`, its own OMV Compose project "Collabora Office") for a head-to-head reliability trial against ONLYOFFICE โ€” triggered by confirmed ONLYOFFICE bugs (conditional formatting crashing on formula cells; silent reverts to hours-old document versions). Only one Office app is ever enabled in Nextcloud at a time โ€” currently `richdocuments`/Collabora is enabled, `onlyoffice` is disabled but still installed for easy rollback. Public URL `https://collabora.kingdezigns.com/`, requires its own Pi-hole local DNS override and a WOPI allow-list (`192.168.150.35`). First real-document test succeeded with a notably fast load time. Full config, setup troubleshooting, and rollback steps in `server_nas08.md`. - **NAS08 Collabora stock/fund price macro integration (2026-07-22, working):** The ONLYOFFICE `FUNDPRICE`/`FUNDPRICE_HIST`/`STOCKPRICE`/`STOCKTIME` custom functions were ported to Collabora as a LibreOffice Basic module (`StockFunctions.bas`), calling the same STOCKPROXY backend with no backend changes required. Two `coolwsd.xml` server-config changes were required โ€” macro execution enabling and a `net.lok_allow` hostname allowlist entry for `stocks.kingdezigns.com` โ€” plus a fix to the previously non-functional `stocks.kingdezigns.com` Pi-hole DNS override. Confirmed working with a live price pull as of 2026-07-22. Full troubleshooting detail, exact config edits, and remaining follow-up items (recreating the full ~50-fund table, conditional-formatting re-test, recalc performance) in `server_nas08.md`. - **NAS08 systemd-resolved DNS bug** (fixed 2026-07-18): a stray global `DNS=` override in `/etc/systemd/resolved.conf` caused duplicate/incorrect DNS answers for internal hostnames network-wide on that host. Any future "works from browser but fails from a container/script on NAS08" symptom should check `resolvectl status` for stray global DNS servers first. - **NAS08 STOCKPROXY service (2026-07-21):** Self-hosted Flask API, Docker container `stockproxy` (`~/docker/stockproxy/`), port 5005, public URL `https://stocks.kingdezigns.com/` proxied via NPM on HAS (see Proxy Hosts table in `server_homeassistant.md`). Supplies current + historical mutual fund prices to ONLYOFFICE custom functions (`FUNDPRICE`, `FUNDPRICE_HIST`) via Yahoo Finance, scraped server-side to dodge the browser CORS block that rules out calling Yahoo directly from a spreadsheet macro. Finnhub was evaluated first but dropped from this service โ€” confirmed no mutual fund NAV coverage on the free tier. Current-price cache: 15 min in-memory. Historical-price cache: permanent, SQLite. All endpoints require a shared-secret `key` param (Vaultwarden). Built to support the "HSA Investiments Choices" tab in `Rufus Retirement Account Tracking 2026.xlsx`. `stocks.kingdezigns.com` A record added to the daily Dreamhost DDNS refresh script. Full config and known limitations in `server_nas08.md`. - **NAS08 RANK.EQ Err:522 circular reference fix (2026-07-23, working):** The "HSA Investiments Choices" fund-ranking formula broke with a circular-reference error on any sheet edit (worked fine on load) because it depended on ~50 cells fed by live `FUNDPRICE`/`FUNDPRICE_HIST` network calls. Fixed with a button-triggered LibreOffice Basic macro that snapshots the live price columns into static value-only columns via `setDataArray()`, with percent-change and rank formulas rebuilt to read from the static snapshot instead of the live columns. Full root-cause analysis and macro in `server_nas08.md`. - **NAS08 Collabora Finnhub removal (2026-07-23, working):** `STOCKPRICE`/`STOCKTIME` (Finnhub-backed equity functions) errored due to a missing `net.lok_allow` entry for Finnhub. Instead of allowlisting Finnhub, it was removed entirely โ€” `FUNDPRICE` (STOCKPROXY) now covers equity tickers too, and a new `FUNDTIME` function replaces `STOCKTIME`, returning STOCKPROXY's `resolved_date` (date only, not a time-of-day timestamp โ€” accepted tradeoff). No `coolwsd.xml` changes required. Full detail in `server_nas08.md`. - **Synaplan AI integration** (added 2026-07-18, not yet functional): Nextcloud connector app installed, but the required self-hosted Synaplan backend stack (PHP/MariaDB/Qdrant/optional Ollama) has not been deployed. Treat as a future project, not a bug โ€” see `server_nas08.md` for details before troubleshooting. --- # ๐Ÿ“Œ Future Expansion Additional files may be added for: - Device inventories - Application-specific firewall rules - Backup and recovery procedures - Monitoring and alerting configuration - CrowdSec Console dashboard enrollment - Geo-blocking configuration on UCG Max - Authelia / forward authentication layer - Expand remote launcher to cover NAS08 and NAS16 scripts - **Synaplan self-hosted AI stack deployment** (PHP backend, MariaDB, Qdrant, optional Ollama) โ€” scope resource requirements and deployment plan when ready - **Collabora vs. ONLYOFFICE trial decision** (started 2026-07-21) โ€” once a winner is chosen, update `server_nas08.md` and this index to reflect the final state (remove trial framing, decommission or keep the losing container, update firewall/NPM docs if the losing editor's proxy host is removed) - **STOCKPROXY hardening** โ€” not yet stress-tested at full ~50-ticker scale for Yahoo-side rate limiting; revisit if widespread simultaneous lookup failures are observed --- # โœ”๏ธ End of Index