feat(rego-tunnel): Add Dockerfile and build scripts for cisco-vpn image
Some checks failed
Test / test (push) Has been cancelled
Some checks failed
Test / test (push) Has been cancelled
Includes: - Dockerfile for native Cisco Secure Client in Docker - Build scripts (init-vpn.sh, startup-vnc.sh, vpn-connect.sh) - VNC configuration (xstartup, vnc.service) - build.sh for manual image builds - README documenting the architecture Note: cisco-secure-client-full.tar.gz is gitignored (large binary) Copy it from ~/projects/cisco-vpn/build/ before building. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
18
apps/rego-tunnel/build/scripts/init-vpn.sh
Normal file
18
apps/rego-tunnel/build/scripts/init-vpn.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
# Cisco VPN Docker Init Script
|
||||
# Unmounts Docker's read-only bind mounts to allow VPN to modify DNS settings
|
||||
|
||||
# Backup current DNS config
|
||||
cp /etc/resolv.conf /tmp/resolv.conf.bak 2>/dev/null || true
|
||||
cp /etc/hosts /tmp/hosts.bak 2>/dev/null || true
|
||||
|
||||
# Unmount Docker's bind mounts (this is the key fix!)
|
||||
umount /etc/resolv.conf 2>/dev/null || true
|
||||
umount /etc/hosts 2>/dev/null || true
|
||||
|
||||
# Restore DNS config as regular files
|
||||
cat /tmp/resolv.conf.bak > /etc/resolv.conf 2>/dev/null || echo "nameserver 8.8.8.8" > /etc/resolv.conf
|
||||
cat /tmp/hosts.bak > /etc/hosts 2>/dev/null || echo "127.0.0.1 localhost" > /etc/hosts
|
||||
|
||||
# Start systemd
|
||||
exec /sbin/init
|
||||
Reference in New Issue
Block a user