diff --git a/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md b/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md index 3da7065..d7f1b9b 100644 --- a/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md +++ b/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md @@ -43,6 +43,7 @@ Backups, Secret-Regeln). | g) | Research nimmt einen „separaten Proxmox Backup Server im LAN“ an, dessen Zugangsdaten der Betreiber liefert. Im Repo existiert **kein PBS**; das etablierte hostunabhängige Backup-Ziel ist der `gn-backup`-Account auf `ghostnet-ki` (`10.0.0.90`, eigene Hardware, Rolle `pve_lxc_backup_sync` / `gn_backup_receiver`). | Default: restic-Repo `sftp:gn-backup@10.0.0.90:/var/lib/ghostnet-ai-backup/ct114/restic` (Inventar-Variable `litecoin_backup_repository`, clientseitig verschlüsselt — das Ziel sieht nur Ciphertext). Falls der Betreiber doch ein PBS betreibt, genügen die PBS-Zugangsdaten als Inventar-Override. **Offener Punkt 11.1.** | | h) | Research: LXC-Backup „nur Snapshots, kein vzdump“. Repo-Konvention syncet alle `vzdump-lxc-*`-Archive nach ghostnet-ki (`pve_lxc_backup_sync`). | Bewusste, begründete Abweichung: CT 114 wird **nicht** in den vzdump-Job aufgenommen (150 GiB Chain, nächtlich ×4 Archive wären teuer; Chain ist per Neu-Sync rekonstruierbar; `wallet.dat` ist durch restic verschlüsselt **und** durch Snapshots geschützt). Umsetzung: Rolle `pve_lxc_snapshot` (täglich 04:00, 7 Snapshots Retention) + restic aus dem CT. **Operator-Schritt:** CT 114 im PVE-Backup-Job ausschließen (Abschnitt 6, Phase 0). | | i) | Ressourcen 2 vCPU / 4 GiB / 150 GiB rootfs auf SSD/NVMe. | Übernommen; `local-lvm` (thin, snapshotfähig). Preflight im Provisioning-Skript: `local-lvm` aktiv und ≥ 214 GiB frei. Kein Nesting nötig (kein Podman; `litecoind` als systemd-Service unter User `litecoin`). | +| k) | Research: `onlynet=onion` (P2P ausschließlich zu onion-Peers). Live geprüft 2026-11-27: die kompilierten onion-Seeds von v0.21.5.8 sind alle unerreichbar („host unreachable“ via Tor), während clearnet-via-Tor funktioniert (check.torproject.org via SOCKS: IsTor=true; duckduckgo-onion: HTTP 301). Der Node bliebe ohne Peers. | **Anpassung:** `onlynet=onion` entfällt; mit `proxy=127.0.0.1:9050` geht ALLER Verkehr (DNS-Seeds, clearnet-Peers via Tor-Exits, onion) durch Tor — unsere IP wird nie exponiert, `listen=0`/`discover=0` verhindern Inbound. Audit prüft: jedes Netzwerk hat proxy=127.0.0.1:9050, keine inbound Peers. | | j) | Debian 13, unprivileged, Key-Only-SSH, fail2ban, unattended-upgrades, dedizierter User `litecoin`. | Übernommen nach Repo-Muster: frischer CT per gepinntem Community-Scripts-`debian.sh` + Bootstrap-Hook (wie CT 102, GNAI-016 Phase D), dann Ansible (`litecoin_lxc_baseline`, `litecoin_access`, `litecoin_fail2ban`, …). `unattended-upgrades` auf Debian-Security eingeschränkt (CT-100/101/102-Konvention). | ## 3. Zielarchitektur @@ -251,7 +252,9 @@ getnetworkinfo, getpeerinfo, getwalletinfo, listtransactions, …). - Listener: nur 22 (nftables auf LAN/WG beschränkt), 9332 + 9050 loopback; litecoind v0.21.5.8 läuft, Tor `Bootstrapped 100%`, onion-only (`getnetworkinfo`: onion reachable, ipv4/ipv6 nicht). Sync läuft - (`initialblockdownload: true`). + (`initialblockdownload: true`). **2026-11-27 später:** Befund k — + onion-Seeds tot, daher Umstellung auf „alles via Tor“ (proxy für alle + Netze, kein Inbound); danach Peer-Aufbau und Sync verifiziert. - restic: Key von CT 114 (10.0.0.61) auf gn-backup@ghostnet-ki positiv getestet, von der Workstation negativ (Permission denied); Repo `sftp:gn-backup@10.0.0.90:/var/lib/ghostnet-ai-backup/ct114/restic` diff --git a/proxmox/lxc/ct-114-litecoin-wallet/ansible/playbooks/audit-production.yml b/proxmox/lxc/ct-114-litecoin-wallet/ansible/playbooks/audit-production.yml index 70cc96e..1fbab26 100644 --- a/proxmox/lxc/ct-114-litecoin-wallet/ansible/playbooks/audit-production.yml +++ b/proxmox/lxc/ct-114-litecoin-wallet/ansible/playbooks/audit-production.yml @@ -134,18 +134,24 @@ that: - litecoin_audit_tor_config.rc == 0 - - name: Read the litecoind network state via the read-only wrapper + - name: Verify Tor-only networking and no inbound peers via the read-only wrapper become: false ansible.builtin.shell: | /usr/bin/sudo -n /usr/local/bin/ltc-readonly getnetworkinfo | /usr/bin/python3 -c ' import json, sys data = json.load(sys.stdin) - reach = {n["name"]: n.get("reachable") for n in data["networks"]} - print("network reachability:", reach) - if reach.get("onion") is not True: - sys.exit("onion network is not reachable") - if reach.get("ipv4") is True or reach.get("ipv6") is True: - sys.exit("clearnet network is reachable; expected onion-only") + for n in data["networks"]: + if n.get("proxy") != "127.0.0.1:9050": + sys.exit("network %s is not proxied via Tor: %r" % (n["name"], n.get("proxy"))) + print("all networks proxied via Tor:", [n["name"] for n in data["networks"]]) + ' + /usr/bin/sudo -n /usr/local/bin/ltc-readonly getpeerinfo | /usr/bin/python3 -c ' + import json, sys + peers = json.load(sys.stdin) + inbound = [p for p in peers if p.get("inbound")] + print("peers:", len(peers), "inbound:", len(inbound)) + if inbound: + sys.exit("inbound peers present although listen=0") ' args: executable: /bin/bash @@ -156,9 +162,9 @@ - not ansible_check_mode - litecoin_service_start_allowed | bool - - name: Report the onion-only network state + - name: Report the Tor-only network state ansible.builtin.debug: - msg: "{{ litecoin_audit_networkinfo.stdout | default('check mode or node stopped: skipped') }}" + msg: "{{ litecoin_audit_networkinfo.stdout_lines | default(['check mode or node stopped: skipped']) }}" when: - not ansible_check_mode - litecoin_service_start_allowed | bool diff --git a/proxmox/lxc/ct-114-litecoin-wallet/ansible/roles/litecoin_core/templates/litecoin.conf.j2 b/proxmox/lxc/ct-114-litecoin-wallet/ansible/roles/litecoin_core/templates/litecoin.conf.j2 index 18ec377..5d2af45 100644 --- a/proxmox/lxc/ct-114-litecoin-wallet/ansible/roles/litecoin_core/templates/litecoin.conf.j2 +++ b/proxmox/lxc/ct-114-litecoin-wallet/ansible/roles/litecoin_core/templates/litecoin.conf.j2 @@ -1,13 +1,15 @@ # Managed by Ansible role litecoin_core. No credentials in this file: # RPC is cookie-authenticated and bound to loopback only (GNAI-024 Befund d/e). -# --- Network: Tor only, no clearnet, no inbound --- +# --- Network: ALL traffic via Tor (SOCKS5), no inbound, our IP never exposed --- +# GNAI-024 Befund k (2026-11-27): the compiled-in onion seeds of v0.21.5.8 are +# unreachable ("host unreachable" via Tor while clearnet-via-Tor works), so +# onlynet=onion would leave the node peerless forever. With proxy set, DNS +# seeds and clearnet peers are reached through Tor exit relays; listen=0 and +# discover=0 keep the node dial-out only. proxy={{ litecoin_core_tor_socks }} -onlynet=onion listen=0 discover=0 -dnsseed=0 -fixedseeds=0 upnp=0 natpmp=0