OFVPN is a small native macOS menu bar GUI application for openfortivpn. It wraps the command-line VPN workflow into a simple menu bar application with status, external/internal IP display, connect/disconnect controls, and log information.
The application is designed for users who currently connect with:
sudo openfortivpn -c "$HOME/Documents/.fortivpn-config"- Menu bar-only macOS application.
- Connects with
openfortivpnusing a remembered configuration file. - Shows connection state in the menu bar.
- Shows external IP and internal IPv4 addresses.
- Provides Connect, Disconnect, Check Logs, and Exit actions.
- Prompts before exiting while connected and can disconnect before quitting.
- Disconnect does not require a second password prompt after a successful connect.
- macOS 13 or newer.
- Apple Command Line Tools or Xcode.
- Homebrew.
openfortivpn.- A valid
openfortivpnconfiguration file, for example:
$HOME/Documents/.fortivpn-config
Install Homebrew if needed:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Install openfortivpn:
brew install openfortivpnCheck it is available:
openfortivpn --versionCreate or copy your existing configuration file. A typical location is:
mkdir -p "$HOME/Documents"
touch "$HOME/Documents/.fortivpn-config"
chmod 600 "$HOME/Documents/.fortivpn-config"Example configuration file:
host = vpn.server.com
port = 443
username = your.username
password = your.password
trusted-cert = <certificate-digest-if-required>Clone the repository, then build the application:
chmod +x build-app.sh package-dmg.sh
./build-app.shThe application bundle is created at:
.build/OFVPN.app
Run it locally:
open ".build/OFVPN.app"On first launch, OFVPN asks you to select your openfortivpn config file. The selected path is remembered for future launches.
When connecting, macOS shows an administrator authorization prompt because openfortivpn needs elevated privileges to configure the tunnel.
After building, copy the application to Applications:
cp -R ".build/OFVPN.app" /Applications/
open "/Applications/OFVPN.app"If you rebuild frequently, quit the running application first:
pkill -x FortiVPNMenuBar 2>/dev/null || trueBuild the application and create a compressed DMG:
./build-app.sh
./package-dmg.shThe DMG is created at:
.build/OFVPN-<version>.dmg
For example:
.build/OFVPN-1.26.dmg
- Update the version in
build-app.sh. - Make sure
Other/applicationIcon1.pngexists. The build script converts it intoOFVPN.icnsand includes it in the app bundle. - Build the application:
./build-app.sh- Create the DMG:
./package-dmg.sh- Test the DMG locally by opening it and dragging
OFVPN.appto Applications.
OFVPN writes connection logs to the current user's temporary directory:
$TMPDIR/fortivpn-menubar/openfortivpn-current.log
Use Check Logs from the menu bar to open the current log.
- OFVPN is a GUI wrapper around
openfortivpn; it does not replaceopenfortivpn. - Disconnect is handled by a small root-side watcher started during Connect, so disconnecting does not require a second password prompt.
- The built app is unsigned. On some Macs, Gatekeeper may require you to right-click and choose Open the first time, or to sign/notarize the app for organization-wide distribution.
Application icon created by Secret Studio - Flaticon - https://www.flaticon.com/free-icon/vpn_5175160?term=vpn&page=1&position=4&origin=search&related_id=5175160


