,ovpn config to mikrotik vpn client

Hi

I have the following (working) ovpn client config file that I’d like to use from the Mikrotik OpenVPN client (which does - obviously ? - not understand ovpn files)

dev tun
persist-tun
persist-key
cipher AES-128-CBC
ncp-ciphers AES-256-GCM:AES-128-GCM
auth SHA1
tls-client
client
resolv-retry infinite
remote x.x.x.x 10022 udp
lport 0
auth-user-pass Pass.txt
remote-cert-tls server
comp-lzo no

<ca>
-----BEGIN CERTIFICATE-----
(... some cert here)
-----END CERTIFICATE-----
</ca>
setenv CLIENT_CERT 0

I have imported the cert and tried to setup a client interface but with zero success so far - it just goes “connecting” and “disconnecting”.

  1. Is there any hope here ?
  2. How do I make the ovpn log more verbose

Any input most appreciated !

I see you are trying to accomplish a UDP configuration. OpenVPN has been traditionally supported only for TCP in Mikrotik, but now the (beta) version 7 offers UDP connections.

The very first thing you would have to do is to upgrade your router to 7.1beta, and then add a ovpn-client connection:

/interface/ovpn-client/add connect-to=x.x.x.x port=10022 protocol=udp user=xxxx password=zzzz cipher=aes128 certificate=whatever

Upgrading to 7.1 could be a problem by itself, unless you have a simple configuration/hardware combo… so you might as well wait until 7 is stable.

Also, to change logging you could use something like

/system/logging/add topics=ovpn,debug,!packet

which will add memory debugging output for the “ovpn” topic, but exclude the packet level output. As ovpn implementation is (used to be? I’m really not sure) based on ppp, you might also want to add a similar line with topics ppp,debug,!packet to see what goes on…

Many thanks - I have managed to have it working !