Files
runtipi/apps/rego-tunnel/build/scripts/init-vpn.sh
alexz 838b33d6c5
Some checks failed
Test / test (push) Has been cancelled
feat(rego-tunnel): Add Dockerfile and build scripts for cisco-vpn image
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>
2026-01-16 20:47:20 +00:00

19 lines
660 B
Bash

#!/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