Skip to content

Instantly share code, notes, and snippets.

@hunzo
Last active September 30, 2025 08:44
Show Gist options
  • Select an option

  • Save hunzo/ca23a44deab9dd940b2316c957884b92 to your computer and use it in GitHub Desktop.

Select an option

Save hunzo/ca23a44deab9dd940b2316c957884b92 to your computer and use it in GitHub Desktop.
#!/bin/bash
echo "Initializing VPN setup script..."
echo "enter vpn server:"
read vpnserver
echo "enter vpn user:"
read vpnuser
echo "enter vpn password:"
read -s vpnpass
echo "enter id:"
read -s vpnid
echo "enter secret:"
read -s vpnsecret
sudo apt update -y
sudo apt install -y network-manager-vpnc
cat <<EOF | sudo tee /usr/local/bin/vpnlogin
#!/bin/bash
sudo vpnc --username $vpnuser --password $vpnpass --gateway $vpnserver --local-port 0 --id $vpnid --secret $vpnsecret
EOF
sudo chmod +x /usr/local/bin/vpnlogin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment