Before setting up the OpenVPN client, make sure you have the following information ready: Drive Link
You can generate a random password for the user using the Avast Random Password Generator.
Login to MikroTik via Winbox:
Go to PPP and click on the Secrets tab.
Press the Add (+) button to create a new profile.
Configure the profile:
Click OK to save.
Go to System > Certificates:
Add a New Certificate:
![]() |
![]() |
---|---|
Certs Interface | Create Cert |
Key Usage:
![]() |
![]() |
---|---|
Initial_KeyUsage | KeyUsage |
Click OK to save the certificate.
Highlight the Newly Created Certificate:
Click the Sign Button:
Select the CA:
Verify the Status:
Export the Certificate:
Set a Passphrase (Optional):
Click Export to generate the certificate and key files.
Navigate to Files:
Locate the Exported Files:
Download the Files:
Place the downloaded .crt and .key files on the OVPN client machine.
Download the Required Files
Use the provided Google Drive link: Download Files
Download the following three files:
secret
sayukth_vpn_config.ovpn
OpenVpnCaCert.crt
Modify the secret
File
Open the secret
file in a text editor. Update it with the username and password for the respective user.
Example:
anand.chinta@sayukth.com
MiTTdq7pJw09RGl
Update the sayukth_vpn_config.ovpn
File
Open the sayukth_vpn_config.ovpn
file in a text editor. Add the content of the OpenVpnCaCert.crt
file and any additional user-specific .crt
or .key
files into the appropriate sections.
client
dev tun
proto tcp-client
remote 183.82.7.33
port 1194
nobind
persist-key
persist-tun
tls-client
remote-cert-tls server
ca OpenVpnCaCert.crt
cert ovpn-anandchinta.crt # <-- Highlighted: User-specific certificate
key ovpn-anandchinta.key # <-- Highlighted: User-specific key
verb 4
mute 10
cipher AES-256-CBC
auth SHA1
auth-user-pass secret
auth-nocache
Organize All Files
Ensure all necessary files are placed in a single folder(username):
secret
sayukth_vpn_config.ovpn
OpenVpnCaCert.crt
.crt
and .key
filesVerify
Confirm that:
secret
file has the correct username and password.sayukth_vpn_config.ovpn
file contains the OpenVpnCaCert.crt
and any user-specific .crt
and .key
content.Save the configuration and connect to the VPN.
You are now ready to use the .ovpn
configuration for the VPN setup!
Install OpenVPNClient in the system. OpenVPN Client
Import the .ovpn(sayukth_vpn_config.ovpn) file and click the toogle button for connection through VPN
Place all the 5 files in single folder
![]() |
![]() |
---|---|
Interface Upload | Imported Profile |
Ensure your system packages are updated:
sudo apt update
sudo apt upgrade -y
Install OpenVPN using the following command:
sudo apt-get install openvpn -y
You have the following important files for VPN setup:
OpenVpnCaCert.crt
: CA certificate file.ovpn-username.crt
: User certificate file.ovpn-username.key
: User private key file.sayukth_vpn_config.ovpn
: OpenVPN configuration file.secret
: Additional secret file, if required.Copy all the files to the /etc/openvpn/
directory:
sudo cp OpenVpnCaCert.crt ovpn-username.crt ovpn-username.key sayukth_vpn_config.ovpn secret /etc/openvpn/
sudo chmod 600 /etc/openvpn/*.key
sudo chmod 644 /etc/openvpn/*.crt
sudo chmod 644 /etc/openvpn/sayukth_vpn_config.ovpn
sudo chmod 600 /etc/openvpn/secret
Run the OpenVPN service with your .ovpn
configuration file:
sudo openvpn --config /etc/openvpn/sayukth_vpn_config.ovpn
You might need to provide a username and password if prompted. Use the credentials provided by your VPN service.
If you want OpenVPN to start automatically during boot:
sudo systemctl enable openvpn@client
sudo systemctl start openvpn@client
To ensure OpenVPN is running correctly:
Check the OpenVPN logs for any errors:
sudo journalctl -u openvpn@client
Verify your public IP address:
curl ifconfig.me
If the VPN connection is active, the IP address displayed should match the VPN’s network.