Forticlient Terminal VPN (ftermvpn) is a tool that allows you to manage your VPN connections with Forticlient VPN in a faster, more practical and stable way through a terminal. Through a terminal-based menu, you can easily start your VPN connections and manage them without disconnections.
I was encouraged to develop this tool because the user interface of Forticlient on macOS was inadequate and people around me who used Forticlient VPN often experienced disconnection problems. After realizing that VPN connections through the terminal largely eliminated such problems, I aimed to provide a simple and effective solution that even users with limited system knowledge could easily use.
You need to have brew installed on your system. If you dont have brew, you can check this official website for brew installation : Brew Official Website
After you installed brew, you need to install dialog for UI stylish menu, jq for JSON processes and wget for download the necessary files.
💡 You don't have to install wget, you can manually copy the file contents from the repo, but if you're lazy I suggest you do.
brew install openfortivpn
brew install dialog
brew install jq
brew install wgetLinux support will added soon.
At the moment I haven't adapted it for linux systems yet. I will share it as soon as I can. If you don't want to wait, you can use it on linux by using whiptail instead of dialog and making the relevant changes.
Create a hidden directory in your home directory and set standard permissions with following code :
mkdir -m 755 ~/.ftermvpnwget -O ~/.ftermvpn/ftermvpn.sh https://raw.githubusercontent.com/bugra-gokcek/Forticlient-Terminal-VPN/refs/heads/main/ftermvpn_for_mac.sh
wget -O ~/.ftermvpn/vpn_config.json https://raw.githubusercontent.com/bugra-gokcek/Forticlient-Terminal-VPN/refs/heads/main/vpn_config.jsonMake the ftermvpn.sh script executable :
chmod +x ~/.ftermvpn/ftermvpn.shEnsure that the vpn_config.json file has appropriate read-write permissions :
chmod 664 ~/.ftermvpn/vpn_config.jsonCreate a symbolic link in /usr/local/bin to run the script using the ftermvpn command :
sudo ln -s ~/.ftermvpn/ftermvpn.sh /usr/local/bin/ftermvpnAfter completing these steps, you can run the ftermvpn by simply typing ftermvpn in the terminal.
If you dont want to create link or you have some issues with links, you can create an alias for easier access.
echo "alias ftermvpn='bash ~/.ftermvpn/ftermvpn.sh'" >> ~/.zshrcecho "alias ftermvpn='bash ~/.ftermvpn/ftermvpn.sh'" >> ~/.bashrcIf you need help or encounter an issue, feel free to open an issue. I’ll assist as quickly as possible.