This commit is contained in:
79
apps/rego-tunnel-linux/vpn_scripts/install-cisco.sh
Executable file
79
apps/rego-tunnel-linux/vpn_scripts/install-cisco.sh
Executable file
@@ -0,0 +1,79 @@
|
||||
#!/bin/bash
|
||||
# Install Cisco Secure Client on Ubuntu VM
|
||||
# Run this script once after the VM is set up
|
||||
|
||||
set -e
|
||||
|
||||
echo "========================================"
|
||||
echo " Installing Cisco Secure Client"
|
||||
echo "========================================"
|
||||
|
||||
# Install dependencies
|
||||
echo "Installing dependencies..."
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y xdotool oathtool xclip p7zip-full curl wget \
|
||||
libpango-1.0-0 libpangocairo-1.0-0 libgtk-3-0 libwebkit2gtk-4.0-37 \
|
||||
libjavascriptcoregtk-4.0-18 libnss3 net-tools iproute2 iptables
|
||||
|
||||
# Create Cisco directories
|
||||
echo "Creating Cisco directories..."
|
||||
sudo mkdir -p /opt/cisco/secureclient
|
||||
sudo mkdir -p /opt/.cisco/certificates/ca
|
||||
|
||||
# Copy Cisco installation from shared folder
|
||||
if [ -d "/mnt/shared/secureclient" ]; then
|
||||
echo "Copying Cisco Secure Client from shared folder..."
|
||||
sudo cp -r /mnt/shared/secureclient/* /opt/cisco/secureclient/
|
||||
sudo chmod +x /opt/cisco/secureclient/bin/*
|
||||
|
||||
# Create symlinks for system-wide access
|
||||
sudo ln -sf /opt/cisco/secureclient/bin/vpn /usr/local/bin/vpn
|
||||
sudo ln -sf /opt/cisco/secureclient/bin/vpnui /usr/local/bin/vpnui
|
||||
sudo ln -sf /opt/cisco/secureclient/bin/vpnagentd /usr/local/bin/vpnagentd
|
||||
|
||||
# Create library symlinks
|
||||
sudo ldconfig /opt/cisco/secureclient/lib
|
||||
|
||||
# Create systemd service for vpnagentd
|
||||
sudo tee /etc/systemd/system/cisco-vpnagentd.service > /dev/null << 'EOF'
|
||||
[Unit]
|
||||
Description=Cisco Secure Client VPN Agent
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/opt/cisco/secureclient/bin/vpnagentd
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable cisco-vpnagentd
|
||||
sudo systemctl start cisco-vpnagentd
|
||||
|
||||
echo "Cisco Secure Client installed successfully!"
|
||||
else
|
||||
echo "ERROR: Shared folder /mnt/shared/secureclient not found"
|
||||
echo "Please mount the vpn_scripts directory to /mnt/shared"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Copy VPN automation script
|
||||
if [ -f "/mnt/shared/cisco-vpn.sh" ]; then
|
||||
echo "Copying VPN automation script..."
|
||||
cp /mnt/shared/cisco-vpn.sh ~/cisco-vpn.sh
|
||||
chmod +x ~/cisco-vpn.sh
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "========================================"
|
||||
echo " Installation Complete!"
|
||||
echo "========================================"
|
||||
echo ""
|
||||
echo "To connect to VPN:"
|
||||
echo " 1. Start a display session (GUI or VNC)"
|
||||
echo " 2. Run: ~/cisco-vpn.sh"
|
||||
echo ""
|
||||
Reference in New Issue
Block a user