Export client profile
Creating OpenVPN client profiles involves exporting certificates from RouterOS and manually creating the .ovpn configuration file with the proper settings.
Exporting certificates from RouterOS
Export CA certificate
First, export the Certificate Authority (CA) certificate:
In WinBox go to System -> Certificates, right-click on your CA certificate (e.g., LMTCA) and select Export:
File Name - ca.crt
Type - PEM
Export Passphrase - Leave empty for CA certificate
/certificate export-certificate LMTCA export-passphrase="" type=pemExport client certificate and key
Export the client certificate with its private key:
In WinBox go to System -> Certificates, right-click on your client certificate and select Export:
File Name - client.crt
Type - PEM
Export Passphrase - Enter a secure passphrase
This will create two files:
cert_export_CLIENT01.crt- Client certificatecert_export_CLIENT01.key- Client private key (encrypted)
Download certificate files
Go to Files in WinBox and download the exported certificate files:
cert_export_LMTCA.crt(CA certificate)cert_export_CLIENT01.crt(Client certificate)cert_export_CLIENT01.key(Client private key)
Creating the .ovpn configuration file
Basic client configuration template
Create a new text file with .ovpn extension and add the following configuration:
Configuration parameters explanation
Connection settings:
remote- Your server's public IP and portproto- Protocol (udp/tcp, must match server)cipher- Encryption cipher (must match server)auth- Authentication method (must match server)
Security settings:
tls-version-min- Minimum TLS versionremote-cert-tls server- Verify server certificateauth-user-pass- Enable username/password authentication
Network settings:
redirect-gateway def1- Route all traffic through VPNdhcp-option DNS- Custom DNS servers
Advanced configuration options
Using inline certificates
Instead of separate certificate files, you can embed certificates directly in the .ovpn file:
Multiple server configurations
For redundancy, you can specify multiple server addresses:
Connection-specific routes
Add specific routes instead of redirecting all traffic:
Client configuration templates
Template for different client types
Full tunnel (all traffic through VPN)
Split tunnel (specific networks only)
Mobile client (with compression)
Automated profile generation
Using variables for template generation
You can create a template file and use variables for automated generation:
Create client-template.ovpn:
Generate using template engine
Use a template engine (like Jinja2) to generate client configs:
Client distribution
Secure distribution methods
Encrypted archive - Put .ovpn and certificates in password-protected ZIP
Secure file sharing - Use encrypted file sharing services
USB delivery - For high-security environments
Split delivery - Send .ovpn and certificates separately
Client setup instructions
Windows OpenVPN GUI:
Install OpenVPN GUI client
Copy .ovpn file to
C:\Program Files\OpenVPN\config\Right-click OpenVPN GUI tray icon and connect
Android OpenVPN Connect:
Install OpenVPN Connect app
Import .ovpn profile
Enter username/password when prompted
iOS OpenVPN Connect:
Install OpenVPN Connect app
Import profile via iTunes or email
Configure and connect
Linux/macOS Terminal:
Troubleshooting profiles
Common client issues
Authentication failures:
Verify username/password are correct
Check certificate files are not corrupted
Ensure certificate hasn't expired
Connection timeouts:
Verify server IP/port are correct
Check firewall allows OpenVPN traffic
Try different protocol (TCP vs UDP)
Certificate errors:
Ensure CA certificate matches server CA
Check client certificate is signed by same CA
Verify certificate hasn't been revoked
DNS issues:
Add custom DNS servers to config
Check if DNS is being pushed by server
Verify DNS resolution after connection
Last updated
Was this helpful?