Commit Graph
214 Commits
Author SHA1 Message Date
alexzandClaude Opus 4.5 48d0407c79 Add build.sh script for cistech-tunnel
Test / test (push) Has been cancelled
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 10:37:50 +00:00
alexzandClaude Opus 4.5 3c427af6fe Restructure cistech-tunnel to match rego-tunnel pattern
Test / test (push) Has been cancelled
- build/: Dockerfile + entrypoint.sh (base image with VNC/noVNC)
- shared/: Runtime scripts mounted into container
  - xstartup: VNC startup, launches openconnect-vpn in xterm
  - openconnect-vpn: Main VPN script with menu, auto-connect, watchdog
- Removed source/ folder (replaced by build/)
- Updated docker-compose.json with proper volume mounts
- Changed port to 6080 (noVNC default)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 10:36:41 +00:00
alexzandClaude Opus 4.5 5d54ed6f80 cistech-tunnel: Remove redundant entrypoint mount
Test / test (push) Has been cancelled
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 10:25:40 +00:00
alexzandClaude Opus 4.5 685488c7d4 cistech-tunnel: Mount entrypoint.sh from shared folder
Test / test (push) Has been cancelled
No more image rebuild needed for script changes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 10:22:01 +00:00
alexzandClaude Opus 4.5 ec40aa2ec1 Fix cistech-tunnel: restore echo pipe in elif branch
Test / test (push) Has been cancelled
The elif branch was missing 'echo "" |' which caused openconnect-sso
to hang waiting for stdin input when OC_PASSWORD is not set.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 10:20:24 +00:00
alexzandClaude Opus 4.5 498926ae5d cistech-tunnel: Auto-fetch server cert, add VPN password field
Test / test (push) Has been cancelled
- entrypoint.sh: Auto-fetch pin-sha256 from VPN URL if not provided
- config.json: Remove OC_SERVERCERT (auto-fetched), add OC_PASSWORD
- docker-compose.json: Add OC_PASSWORD env var

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 10:12:26 +00:00
alexzandClaude Opus 4.5 046552d09a Update cistech-tunnel: proper image tag, clean Dockerfile, add TOTP field
Test / test (push) Has been cancelled
- docker-compose.json: Use git.alexzaw.dev/alexz/cistech-vpn:latest
- config.json: Add OC_TOTP_SECRET field, keep server cert as default
- Dockerfile: Remove hardcoded credentials (come from env at runtime)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 10:07:29 +00:00
alexzandClaude Opus 4.5 27c46542e8 Add host routing watcher for cistech-tunnel (same pattern as rego-tunnel)
Test / test (push) Has been cancelled
- Add shared/host-routing.sh with nft for NAT masquerade
- Add shared/install-host-services.sh to set up systemd watcher
- Add shared/uninstall-host-services.sh for cleanup
- Add /runtime volume mount for trigger file
- Update entrypoint.sh to trigger host routing when VPN connects

Run install-host-services.sh on host after app install.
Requires image rebuild for entrypoint changes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 09:58:28 +00:00
alexz 0c952a2623 .
Test / test (push) Has been cancelled
2026-01-17 09:43:31 +00:00
alexzandClaude Opus 4.5 50cdd3ea1c Suppress noisy job control messages and ignore empty menu input
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
alexzandClaude Opus 4.5 7c76016fcf Fix FORWARD rules: wait for Cisco chains, then delete+reinsert at pos 1
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
alexzandClaude Opus 4.5 0dca06fbc8 Fix host routing: use nft for NAT, insert FORWARD rules before Cisco chains
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
alexz 4c067c14d8 .
Test / test (push) Has been cancelled
2026-01-17 08:49:44 +00:00
alexz 529842a411 Add VPN watchdog with auto-reconnect and disable screen blanking
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
alexz 99847c3ff0 Update build/README.md for current architecture
Test / test (push) Has been cancelled
2026-01-17 04:02:07 +00:00
alexz 96d4e32672 Update documentation for native Docker architecture
Test / test (push) Has been cancelled
- Rewrote description.md with current architecture
- Removed README.md (outdated Windows VM docs)
- Added install/uninstall instructions for host services
2026-01-17 04:01:14 +00:00
alexz c3581c7ecc Add install/uninstall scripts for host systemd services
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
alexz 657081678f cisco-vpn: Remove all VM references, use container IP
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
alexz 89e8f5cffc host-routing.sh: Complete rewrite - simplified, no VM/redsocks
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
alexz 5e0004c0d8 .
Test / test (push) Has been cancelled
2026-01-17 02:42:09 +00:00
alexz aa071a1fdb cisco-vpn: -m flag goes straight to menu without any checks
Test / test (push) Has been cancelled
2026-01-17 02:38:38 +00:00
alexz 2b9688ce44 cisco-vpn: Fix missing ;; in case statement for menu option 1
Test / test (push) Has been cancelled
2026-01-17 02:37:39 +00:00
alexz fa398e8c86 cisco-vpn: Strip ANSI color codes from log file
Test / test (push) Has been cancelled
2026-01-17 02:36:32 +00:00
alexz c7cf401b0a cisco-vpn: Daily log rotation with 7-day retention
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
alexz 38530ea0df cisco-vpn: Remove sudo (running as root) and add file logging
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
alexz c933d6e6da Fix: Import Docker env vars into VNC session
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
alexz e4b648e447 fix script
Test / test (push) Has been cancelled
2026-01-17 02:12:39 +00:00
alexz e5d4b4d2e5 Fix noVNC startup script: correct bash variable syntax
Test / test (push) Has been cancelled
Renovate / renovate (push) Has been cancelled
Changed ${NOVNC_PORT-:-6080} to ${NOVNC_PORT:-6080}
The extra dash was causing websockify to not start properly.
2026-01-17 01:55:18 +00:00
alexz 35e0d67446 .
Test / test (push) Has been cancelled
2026-01-17 01:08:29 +00:00
alexz 747f71e27c .
Test / test (push) Has been cancelled
2026-01-17 00:44:10 +00:00
alexz 6e5656a00b .
Test / test (push) Has been cancelled
2026-01-17 00:42:44 +00:00
alexz ab004b78eb .
Test / test (push) Has been cancelled
2026-01-17 00:42:15 +00:00
alexz b42bac35bb .
Test / test (push) Has been cancelled
2026-01-17 00:37:40 +00:00
alexzandClaude Opus 4.5 7b874169cb Update cisco-vpn to use 172.31.0.0/24 container network
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
alexzandClaude Opus 4.5 2f7a51d2b7 Move restart-routing trigger into setup_forwarding
Test / test (push) Has been cancelled
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 23:16:29 +00:00
alexzandClaude Opus 4.5 6097bcbe8f Remove unnecessary runtime mkdir from entrypoint
Test / test (push) Has been cancelled
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 23:13:52 +00:00
alexzandClaude Opus 4.5 f1fd3572c5 Use APP_DATA_DIR directly for runtime mount
Test / test (push) Has been cancelled
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 23:12:55 +00:00
alexzandClaude Opus 4.5 3d715664db Create runtime directory in entrypoint
Test / test (push) Has been cancelled
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 23:11:53 +00:00
alexzandClaude Opus 4.5 31cb8f6db5 Add trigger-based host routing restart (no SSH needed)
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
alexzandClaude Opus 4.5 abe7a7ab08 Remove deleted init-rego.sh mount from docker-compose files
Test / test (push) Has been cancelled
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 23:03:03 +00:00
alexzandClaude Opus 4.5 46fe4f5557 Add xstartup to launch cisco-vpn in terminal
Test / test (push) Has been cancelled
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 23:01:39 +00:00
alexzandClaude Opus 4.5 35e4f1f6b7 Remove unused shared scripts and vpn_scripts-not-used folder
Test / test (push) Has been cancelled
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 23:00:00 +00:00
alexzandClaude Opus 4.5 767526054e Add IP forwarding to entrypoint
Test / test (push) Has been cancelled
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 22:58:43 +00:00
alexzandClaude Opus 4.5 69062bd828 Remove unused build scripts, fix cisco-vpn monitor loop
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
alexz b3259d2981 .
Test / test (push) Has been cancelled
2026-01-16 22:48:04 +00:00
alexz dc463f4cf0 .
Test / test (push) Has been cancelled
2026-01-16 22:44:58 +00:00
alexz 74f4ab982e .
Test / test (push) Has been cancelled
2026-01-16 22:10:57 +00:00
alexz 070e358463 change build step
Test / test (push) Has been cancelled
2026-01-16 22:08:37 +00:00
alexz 99fc5a5600 update dockerfile
Test / test (push) Has been cancelled
2026-01-16 21:45:38 +00:00
alexzandClaude Opus 4.5 ee6cb6c90d refactor(rego-tunnel): Inline startup-vnc.sh and vnc.service in Dockerfile
Test / test (push) Has been cancelled
These two files cannot be overridden at runtime, so they're now
baked directly into the Dockerfile using heredocs.

Remaining scripts (can be overridden at runtime):
- init-vpn.sh
- xstartup
- vpn-connect.sh

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 21:19:55 +00:00