How to set up OpenVPN on router: Mikrotik RouterOS

IMPORTANT: Don't setup your Mikrotik RouterOS remotely. You have to be connected via the LAN interface, otherwise you will cut the connection (access to the router) and you will not be able to access it remotely any more.

Update Router OS on your Mikrotik router to latest version (at least version v5.8)

Connect to your Mikrotik router via WinBox.

Setup the DNS servers manually to Google DNS: IP -> DNS -> Settings -> Servers. Enter and

Write down the default gateway IP address of your Internet provider (ISP) and remove the default-route (Dst. Address = routed via your ISP GW) from the routing table. If you don't use DHCP Client please follow the STEP 5.

Go to IP -> DHCP Client and disable the "Add Default Route" option.

Your routing table should not contain any default route now. See the screen bellow.

Add new static route to your routing table. Dst. address is an IP address of the VPN server you want connect to. Gateway is the default gateway IP address of your Internet provider (ISP). You should have the IP written down since STEP 1.

Setup the OVPN client according to the screens bellow. Status should appear as connected once you click Apply.

Please check your interfaces and routing table again. The correct configuration should look similar to the screen bellow.

Now you should be able to ping for example If all works well, then you can setup NAT masquerade of your LAN network so all devices behind the Mikrotik Router will use the VPN connection.

back to downloads