How to Configuring OpenVPN MikroTik Router

OpenVPN is one type of VPN for the interconnection of local networks that utilize public networks (WAN / Internet) with communications that are secure. VPN is commonly used when required high data security. By default, OpenVPN uses UDP port 1194 and required certificate on each device to be connected. For client compatibility, OpenVPN can be built almost on all Operating Systems with the help of third-party applications. OpenVPN uses an algorithm sha1 and md5 for authentication process, and using some cipher that is blowfish128, AES128, AES192 and AES256. Traffic that passes through the OpenVPN tunnel will have overhead ± 16%.

OpenVPN configuration

For example the case, we will try to connect the two networks using OpenVPN. Each network has one main gateway routers.

Openvps configure

First, to improve the security of OpenVPN connection, we will add the certificate on the server and client.
Once we make the certificate, we will activate the first OpenVPN server at the main gateway router Office A’. Select menu on the Tab Interface PPP click on the button Command OVPN Server. And to activate the OpenVPN Server check Enabled option. We also add a certificate for OpenVPN connection in Office A’ as OVPN Server on parameters Certificate’ as the following display.

Openvps configure 2As other VPN connection we will also make a PPP secretto dial a connection from OVPN Client. The configuration of the PPP Secret is like the following display.

Openvps configure 3To further facilitate the setting improvisation, the OpenVPN server we will create a static interface for OpenVPN manually. Actually, if we do not make the interface, the router will make OpenVPN interface is dynamic by the router when the OpenVPN connection is established. However, the interface will be lost if the connection is lost.

As for how to make it select menu PPP Interfaces Add [+] OpenVPN Server Binding. And fill in the required parameters in accordance display the following picture. For the parameter ‘User’ fill in the name of PPP in accordance with the Secret that we have made.
Openvps configure 4Next we will do the configuration to point B’ as OpenVPN Client. We select the PPP menu Interfaces Add [+] OVPN Client. Then fill each parameter as in the following display.
Openvps configure 5If OpenVPN successfully connected then we can see the router OpenVPN server in the PPP menu Active conections. There will be displayed information from the client device successfully connected to the OpenVPN server.
Openvps configure 6Then to connect the LAN between A’ and B’ through the OpenVPN connection, we could add routing settings. As in the picture above it is known that the LAN topology for A’ is and for Office Bis Examples routing rule is as follows:
/ ip route add distance = 1 dstaddress = / 24 gateway = OpenVPN
Openvps configure 7“B”
/ip route
add distance=1 dst-address= gateway=ovpn-out
Openvps configure 8


No comments.

Leave a Reply