OpenVPN mini-guides: Mikrotik RouterOS VPN Client

In the last article I showed how to configure a Mikrotik RouterOS router as an OpenVPN Server.

In this mini-guide, I’ll show how to configure a Mikrotik RouterOS router as an OpenVPN Client, and connect it to the server.

First, you’ll need to copy a client certificate to your client router. You can use this guide to help you generate one if you haven’t already done so. Then import them into RouterOS, as per the instructions.

Then you need to create a PPP Profile.

/ppp profile
add change-tcp-mss=default comment="" name=openvpn-out only-one=default \
use-compression=default use-encryption=default use-vj-compression=default

Next, you need to add the ovpn-client interface. Make sure that the certificate is the one that you imported, and that the username and password match what you configured on your server.

/interface ovpn-client
add add-default-route=no auth=sha1 certificate=client1 cipher=aes128 \
comment="" connect-to= disabled=no mode=ip name=OVPN-Client \
user=client 1 password=password1 port=1194 profile=openvpn-out

And thats it! Pretty simple really…
If you want all your internet traffic to go over the VPN, change the add-default-route=no to yes, and it will add the default route down the VPN every time it connects.