Command: vpn
Manage VPN connections from the command line.
Usage
Usage: m vpn [OPTIONS] [ARGUMENTS]
Description: Manage VPN connections on macOS from the command line
Options:
--help Show this help message and exit
--list List available VPN connections
--start [VPN] [USER] [PASS] Start a VPN connection
--stop VPN Stop a VPN connection
--status VPN Show the status of a VPN connection
Options
--list
Lists all VPN services configured in Network Preferences.
Example:
m vpn --list
--start [VPN] [USER] [PASS] [SECRET]
Starts a VPN connection. You can provide the connection name and credentials as arguments, or run it without arguments for an interactive prompt.
Examples:
# Start a VPN connection interactively
m vpn --start
# Start a specific VPN connection
m vpn --start "My Office VPN"
# Start a connection with username and password
m vpn --start "My Office VPN" myuser mypassword
--stop VPN
Stops an active VPN connection.
Example:
m vpn --stop "My Office VPN"
--status VPN
Shows the connection status of a specific VPN service.
Example:
m vpn --status "My Office VPN"