Skip to content

Instantly share code, notes, and snippets.

@ravikyada
Created July 18, 2024 05:24
Show Gist options
  • Save ravikyada/9464cf3756026a5423789204f4ba0caf to your computer and use it in GitHub Desktop.
Save ravikyada/9464cf3756026a5423789204f4ba0caf to your computer and use it in GitHub Desktop.
OpenVPN Configs in Ubuntu Debian

OpenVPN3 Commands

Importing Configuration

Import a configuration file and create a persistent profile.

openvpn3 config-import --config client.ovpn --name <profile_name> --persistent

Listing Configurations

List all imported configurations.

openvpn3 configs-list

Listing Sessions

List all active VPN sessions.

openvpn3 sessions-list

Starting a Session

Start a VPN session using a specific profile name.

openvpn3 session-start --config <profile_name>

Start a VPN session directly from a configuration file.

openvpn3 session-start --config client.ovpn

Additional Commands

Stopping a Session

Stop a running VPN session using the session ID.

openvpn3 session-manage --session-id <session_id> --disconnect

Showing Session Details

Show detailed information about a specific session using the session ID.

openvpn3 session-manage --session-id <session_id> --show

Removing a Configuration

Remove an imported configuration by name.

openvpn3 config-remove --name <profile_name>

Checking the Status of a Session

Check the status of a specific VPN session using the session ID.

openvpn3 session-manage --session-id <session_id> --status

Viewing Logs

View logs for a specific session using the session ID.

openvpn3 session-manage --session-id <session_id> --log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment