VPN Up is a shell script designed to enhance your experience with OpenConnect, now on both macOS and Linux distributions. It simplifies the process of establishing a VPN connection and offers a range of features to make VPN usage more efficient and user-friendly.
- Cross-Platform Support: Works seamlessly on macOS and various Linux distributions.
- Dynamic VPN Connection Options: Generates VPN connection options dynamically from a centralized XML configuration.
- Multiple VPN Connections: Define and manage multiple VPN connections using different protocols.
- Password-Free Login: Run OpenConnect without entering a username and password every time.
- Background Mode: Option to run the script in the background or quietly.
- Certificate Authentication: Supports authenticating with a certificate.
- Two-Factor Authentication: Integrated support for Duo's 2FA.
- VPN Connection Status: Easily check the status of your VPN connection.
- Automatic Dependency Management: Checks for and installs required dependencies automatically.
- Enhanced Cross-Platform Compatibility: The script has been updated for compatibility with both macOS and Linux distributions.
- Automatic Dependency Checks and Installation: The script now checks for required dependencies at startup and offers an automatic installation option for missing dependencies.
- Homebrew Integration for macOS: Automated checks and installation option for Homebrew on macOS, used for installing other dependencies.
- Improved User Interaction and Feedback: Enhanced user prompts and feedback for better clarity and user guidance.
- Robust Error Handling: Improved error handling mechanisms for a smoother user experience.
readonly SUDO=FALSE # Options: TRUE or FALSE
readonly SUDO_PASSWORD=""
readonly BACKGROUND=TRUE # Options: TRUE (Runs in background), FALSE (Runs in foreground)
readonly QUIET=TRUE # Options: TRUE (Less output), FALSE (Detailed output)
<VPN>
<name>VPN PROFILE 1</name>
<protocol options="anyconnect, nc, gp, pulse">anyconnect</protocol>
<host>vpn.example.com</host>
<authGroup>developers</authGroup>
<user>username</user>
<password><password></password>
<duo2FAMethod options="passcode, push, phone, sms"><2famethod></duo2FAMethod>
<serverCertificate>SHA1-OtherCharacters</serverCertificate>
</VPN>
- Download the Script: Get the latest release from this link.
- Set Up the Script:
- Move the
vpn-up-for-openconnect
folder to a suitable directory (e.g.,bin
). - Update
vpn-up.command.config
with your settings. - Set up your VPN profiles in
vpn-up.command.profiles.xml
.
- Move the
- Create an Alias: Set up an alias in your shell (
bash
orzsh
). Instructions here. - Run VPN Up: Execute
vpn-up
in your terminal to start. The script will handle any missing dependencies automatically.