Troubleshooting OpenVPN Server issues on a MikroTik CHR

Fix the most common OpenVPN server errors on a MikroTik CHR. Each one below has the error text to look for and what to change.

Note: The fixes below assume the OpenVPN server on your CHR was set up as described in our OpenVPN server guide. Find your error in the list, then jump to it.

Authentication failed for user

Error message: Authentication Failed: user <username> authentication failed

The server rejected the username or password. Check these in order:

  • In PPP > Secrets, open the user and confirm the name and password are what you expect. The secret's Service must be all or ovpn.
  • Check the credentials the client uses: either the file that holds your secrets, or the credentials embedded in your .ovpn file inside the <auth-user-pass> block. They must match the secret exactly.

If you change the .ovpn file, re-import it.


Private key decryption error (bad decrypt)

Error message: Connection Failed: PKey::parse_pem: error in private key:: error 1C80064::Provider routines::bad decrypt

The client can't unlock its private key, which means the client private key password is wrong. If you've forgotten it, go to Certificates and export the client certificate again, then re-import the .ovpn configuration with the new client certificate set.


PKCS12 import error

Error message: PKCS12 Import Error: An error occured during encode or decode operation

This is a possible bug in how the .ovpn file is parsed, and it tends to show up when the file has the extension in capitals (.OVPN). Rename the extension to lowercase (.ovpn). If that doesn't help, recreate the .ovpn configuration.


Connection timeout

The client sends its request and gets nothing back. The server is either not running or not reachable. Work through these:

  • Go to PPP > OVPN Server and make sure the server is enabled.
  • Check that the OpenVPN port is the same in the OVPN Server settings and in your .ovpn file. If you change the file, re-import it.
  • Make sure that port is open and its firewall rule sits above all drop rules. RouterOS reads rules top to bottom, so a drop rule placed first blocks the traffic before it reaches your allow rule.
  • You may need to check the firewall of your own device too, in case it blocks the OpenVPN client.

Connected, but my IP address does not change

Symptom: Connected, but I still see my own IP address on a "what is my IP" site, so the traffic is not redirected.

The tunnel is up, but an option in the .ovpn file isn't enabled. Make sure this line is in your configuration:

OPENVPN CONFIGredirect-gateway def1

Write it without a semicolon at the start of the line, because a semicolon turns the line into a comment and the client ignores it. Re-import the .ovpn file if you changed it.


Peer certificate validation failure

Error message: Connection Failed: Peer certificate validation failure

The wrong certificate is chosen in the OVPN Server settings, or a certificate is invalid. Check the following:

  • The wrong certificate is selected on the server. In PPP > OVPN Server, choose the correct server certificate.
  • The clocks of both the client and the server are right.
  • The client certificate is the right one.

Re-import the .ovpn file if you changed it.

Still stuck? Open a ticket with our support team or ask the assistant in our chat. And if you need a router to run your VPN on, BGOCloud's MikroTik CHR plans come with RouterOS ready to go.

You can also browse our full MikroTik CHR knowledge base for more guides on getting the most out of your router.

Maximize your online security and efficiency with our cloud-based MikroTik routers.

Get Started!
icon knowledge

Related Articles

MikroTik CHR How to set-up L2TP VPN Server. VPN server for Apple devices - Iphone, MacBook. (+ video)

L2TP/IPsec is one of the best-supported VPN protocols for Apple devices — it works natively on...

How-To: Installing & Using Docker Container and Pihole / Adguard Home in MikroTik CHR

As of the latest exciting news around MikroTik and their fresh release of the docker container in...

Set up L2TP over IPSec / PPTP VPN client in Android

In this article, we will show you how to set up a PPTP/L2TP VPN connection to your Android device...

Setup OpenVPN Connect Client in Android

This guide walks you through connecting your Android phone or tablet to an OpenVPN server running...