Easiest way: install the تطبيق STOSPN DPN for Linux (.deb for Debian), sign in with your STOSPN account and click Connect. To use the OpenVPN 3 command-line client instead, follow the steps below with the .ovpn profile from حسابي ← الطلبات.
To install and set up OpenVPN Connect on Debian, follow these steps:
1. Update System Packages & Install Dependencies: Prerequisite: Root or sudo access.
- Open your terminal.
- Update your package index and install required dependencies:
Bash
sudo apt update && sudo apt install -y curl gnupg apt-transport-https ca-certificates
2. Add Official OpenVPN Repository:
- Create the keyrings directory if it does not exist:
Bash
sudo mkdir -p /etc/apt/keyrings
- Import the official OpenVPN GPG signing key:
Bash
curl -fsSL https://packages.openvpn.net/packages-repo.gpg | sudo gpg --dearmor -o /etc/apt/keyrings/openvpn-repo.gpg
- Add the OpenVPN Connect repository to your sources list:
Bash
echo "deb [signed-by=/etc/apt/keyrings/openvpn-repo.gpg] https://packages.openvpn.net/openvpn3/debian $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/openvpn3.list
3. Install OpenVPN Connect (OpenVPN 3):
- Refresh the package lists to include the new repository:
Bash
sudo apt update
- Install the OpenVPN Connect client package:
Bash
sudo apt install -y openvpn3
4. Import Your Configuration Profile:
- Transfer your
.ovpnconfiguration file to your Debian machine. - Import the profile into OpenVPN Connect:
Bash
openvpn3 config-import --config /path/to/your/client.ovpn --name "STOSPN"
5. Establish the Connection:
- Start the VPN session using the imported profile name:
Bash
openvpn3 session-start --config "STOSPN"
- Enter your VPN credentials if prompted.
- Verify active sessions at any time using:
Bash
openvpn3 sessions-list
- To disconnect the session:
Bash
openvpn3 session-manage --config "STOSPN" --disconnect
Alternative: Standard OpenVPN Client
If you prefer using the legacy standard OpenVPN daemon rather than the v3 client framework:
Bash
sudo apt update && sudo apt install -y openvpn
sudo openvpn --config /path/to/your/client.ovpn