33 Commits

Author SHA1 Message Date
d0ff3536d2 fix: set executable bit on shared scripts for rego-tunnel and cistech-tunnel
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 19:07:09 +00:00
0104b45331 rego-tunnel: fix pipefail crash in host-routing.sh remove_all()
The nft|grep|grep|head pipeline fails when no masquerade rule exists,
causing the script to exit under set -euo pipefail. Add || true to
match the cistech-tunnel version.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 21:11:25 +00:00
efc3ad00af rego-tunnel: move all scripts to dynamic mounts
- Move entrypoint.sh from build/scripts/ to shared/
- Create startup-vnc.sh in shared/ (was base64-encoded in Dockerfile)
- Remove baked-in scripts and CMD from Dockerfile (keep vnc.service unit only)
- Entrypoint now: chmod +x all shared scripts, symlinks startup-vnc.sh
  to /opt/scripts/ so systemd vnc.service still finds it
- Fix host watcher: use /bin/bash in ExecStart for permission resilience
- Bump tipi_version to 7

All scripts are now dynamically controlled via volume mounts.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 21:05:14 +00:00
0c952a2623 .
Some checks failed
Test / test (push) Has been cancelled
2026-01-17 09:43:31 +00:00
50cdd3ea1c Suppress noisy job control messages and ignore empty menu input
Some checks failed
Test / test (push) Has been cancelled
- Add disown after vpnui & to suppress "killed" messages
- Ignore empty/whitespace input in menu loop
- Remove "Invalid choice" error (just ignore silently)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 09:38:49 +00:00
7c76016fcf Fix FORWARD rules: wait for Cisco chains, then delete+reinsert at pos 1
Some checks failed
Test / test (push) Has been cancelled
After VPN reconnects, Cisco agent creates its chains asynchronously,
pushing our ACCEPT rules down where they're ineffective. Fix:
1. Wait up to 30s for ciscovpn chain to exist
2. Delete any existing rules (they may be in wrong position)
3. Insert fresh rules at position 1

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 09:26:18 +00:00
0dca06fbc8 Fix host routing: use nft for NAT, insert FORWARD rules before Cisco chains
Some checks failed
Test / test (push) Has been cancelled
- host-routing.sh: Use nft instead of iptables for NAT masquerade
  (iptables-nft backend doesn't support iptables -t nat commands)
- cisco-vpn: Use -I FORWARD 1 instead of -A FORWARD to insert rules
  BEFORE Cisco VPN chains (which have catch-all DROP rules)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 09:21:09 +00:00
4c067c14d8 .
Some checks failed
Test / test (push) Has been cancelled
2026-01-17 08:49:44 +00:00
529842a411 Add VPN watchdog with auto-reconnect and disable screen blanking
Some checks failed
Test / test (push) Has been cancelled
- Added start_watchdog() function that:
  - Checks VPN every 60 seconds
  - Sends keepalive ping every 5 minutes to prevent idle timeout
  - Auto-reconnects up to 3 times if VPN drops
- Disabled screen blanking in xstartup and after VPN connects
- Removed useless monitor loop that only logged
2026-01-17 05:26:58 +00:00
c3581c7ecc Add install/uninstall scripts for host systemd services
Some checks failed
Test / test (push) Has been cancelled
- install-host-services.sh: Creates watcher path/service units
- uninstall-host-services.sh: Removes units and cleans up
- Run once on host after app install
2026-01-17 03:59:06 +00:00
657081678f cisco-vpn: Remove all VM references, use container IP
Some checks failed
Test / test (push) Has been cancelled
- Removed get_vm_bridge_ip() and get_container_gateway()
- Added get_container_ip() for eth0 (172.31.0.x network)
- Updated setup_forwarding() and show_network_status()
- No more ens3/VM references
2026-01-17 03:03:53 +00:00
89e8f5cffc host-routing.sh: Complete rewrite - simplified, no VM/redsocks
Some checks failed
Test / test (push) Has been cancelled
- Hardcoded container IP (172.31.0.10) and bridge (br-rego-vpn)
- Simple start/stop/restart actions
- Removes stale routes before applying new ones
- Logs to /var/log/rego-routing.log
- Removed: redsocks, nft, VM subnet, container_apply
2026-01-17 02:59:34 +00:00
5e0004c0d8 .
Some checks failed
Test / test (push) Has been cancelled
2026-01-17 02:42:09 +00:00
aa071a1fdb cisco-vpn: -m flag goes straight to menu without any checks
Some checks failed
Test / test (push) Has been cancelled
2026-01-17 02:38:38 +00:00
2b9688ce44 cisco-vpn: Fix missing ;; in case statement for menu option 1
Some checks failed
Test / test (push) Has been cancelled
2026-01-17 02:37:39 +00:00
fa398e8c86 cisco-vpn: Strip ANSI color codes from log file
Some checks failed
Test / test (push) Has been cancelled
2026-01-17 02:36:32 +00:00
c7cf401b0a cisco-vpn: Daily log rotation with 7-day retention
Some checks failed
Test / test (push) Has been cancelled
- Logs now saved to /var/log/cisco-vpn/YYYY-MM-DD.log
- Automatic cleanup of logs older than 7 days
- Each day gets its own log file
2026-01-17 02:34:22 +00:00
38530ea0df cisco-vpn: Remove sudo (running as root) and add file logging
Some checks failed
Test / test (push) Has been cancelled
- Removed all sudo commands since container runs as root
- Added LOG_FILE at /var/log/cisco-vpn.log
- Modified log() to write to both console and file
- Added startup logging with env var status
2026-01-17 02:33:07 +00:00
c933d6e6da Fix: Import Docker env vars into VNC session
Some checks failed
Test / test (push) Has been cancelled
Systemd services don't inherit container environment variables.
Added sourcing from /proc/1/environ in xstartup to fix this.
2026-01-17 02:19:13 +00:00
e4b648e447 fix script
Some checks failed
Test / test (push) Has been cancelled
2026-01-17 02:12:39 +00:00
7b874169cb Update cisco-vpn to use 172.31.0.0/24 container network
Some checks failed
Test / test (push) Has been cancelled
- Replace 100.100.0.0/24 with 172.31.0.0/24
- Update gateway to 172.31.0.1

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 23:26:26 +00:00
2f7a51d2b7 Move restart-routing trigger into setup_forwarding
Some checks failed
Test / test (push) Has been cancelled
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 23:16:29 +00:00
31cb8f6db5 Add trigger-based host routing restart (no SSH needed)
Some checks failed
Test / test (push) Has been cancelled
- Add runtime volume mount for trigger files
- cisco-vpn now creates /runtime/restart-routing trigger file
- Host systemd path watcher handles restart

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 23:11:11 +00:00
46fe4f5557 Add xstartup to launch cisco-vpn in terminal
Some checks failed
Test / test (push) Has been cancelled
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 23:01:39 +00:00
35e4f1f6b7 Remove unused shared scripts and vpn_scripts-not-used folder
Some checks failed
Test / test (push) Has been cancelled
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 23:00:00 +00:00
767526054e Add IP forwarding to entrypoint
Some checks failed
Test / test (push) Has been cancelled
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 22:58:43 +00:00
69062bd828 Remove unused build scripts, fix cisco-vpn monitor loop
Some checks failed
Test / test (push) Has been cancelled
- Delete init-vpn.sh, vpn-connect.sh, xstartup from build/scripts
- Change cisco-vpn monitor to background process so menu shows after connect

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 22:56:34 +00:00
b3259d2981 .
Some checks failed
Test / test (push) Has been cancelled
2026-01-16 22:48:04 +00:00
b52ba03be4 fix(rego-tunnel): Make app work out of the box from repo
Some checks failed
Test / test (push) Has been cancelled
- Add init-rego.sh and xstartup to repo's shared folder
- Update docker-compose.json with all volume mounts
- Update docker-compose.yml with cgroup: host
- Mount scripts directly from repo (not user-config)

Now works on fresh install without any user-config overrides.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 20:49:39 +00:00
470517a00f refactor(rego-tunnel): Complete migration to native Docker VPN
Some checks failed
Test / test (push) Has been cancelled
- Add custom init-rego.sh that unmounts /etc/resolv.conf and /etc/hosts for VPN
- Add custom xstartup that launches terminal with cisco-vpn script
- Add TARGET_IP environment variable
- Remove QEMU/VM dependencies (TAPs, bridges, dnsmasq not needed)
- The cisco-vpn script handles: vpnagentd, auto-login with TOTP, IP forwarding

Architecture:
1. init-rego.sh: DNS fix + IP forwarding + start systemd
2. systemd: manages vpnagentd and vnc services
3. xstartup: opens xterm with cisco-vpn script
4. cisco-vpn: auto-connects VPN, sets up routing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 20:45:16 +00:00
b55708721c Add host routing service restart after VPN connects
Some checks failed
Test / test (push) Has been cancelled
SSH to host and restart rego-routing.service after VPN connection
is established in the VM.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 10:28:56 +00:00
e13cc2b851 Add Traefik basic auth for rego-tunnel noVNC
Some checks failed
Test / test (push) Has been cancelled
- Remove websockify BasicHTTPAuth (doesn't trigger browser prompts)
- Add Traefik basicauth middleware instead (proper browser auth dialog)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-04 09:49:08 +00:00
f1ba1f050d new image structure for cisco-vpn and related scripts
Some checks failed
Test / test (push) Has been cancelled
2026-01-04 09:01:52 +00:00