3.129.250.3 - United States, Fairfield
Router

Setting up OpenVPN on MirkoTik

Setting up a VPN connection using the OpenVPN protocol in the Mikrotik RouterOS is easy.

1
Log in to the router's web interface. The password can be found on the sticker that comes with the router.
Next
Setting up OpenVPN on RouterOS, step 1 Setting up OpenVPN on RouterOS, step 1
2
Go to the Files and click Browse, select and upload the OpenVPN configuration file. The configuration files are archived and can be downloaded from your personal area on the securevpn.pro. You can upload any configuration file, which will be needed later to extract the certificate.
Next
Setting up OpenVPN on RouterOS, step 2 Setting up OpenVPN on RouterOS, step 2
3
Go to System - Certificates and click Import.
Next
Setting up OpenVPN on RouterOS, step 3 Setting up OpenVPN on RouterOS, step 3
4
Specify any name, select the uploaded certificate and click Import.
Next
Setting up OpenVPN on RouterOS, step 4 Setting up OpenVPN on RouterOS, step 4
5
As a result, we will receive 2 certificates. You need to remember the Name and Common Name of the KT certificate.
Next
Setting up OpenVPN on RouterOS, step 5 Setting up OpenVPN on RouterOS, step 5
6
Go to Interfaces, open tab Interface, click on Add new and select OVPN Client.
Next
Setting up OpenVPN on RouterOS, step 6 Setting up OpenVPN on RouterOS, step 6
7
Fill in the fields as follows:
  • Connect To - the connection server, the list of servers can be found in readme.txt in the subscription archive
  • Port - specify 443 for connection port
  • User - specify Common Name from step 5. You can also get the subscription name from readme.txt, which is archived with a subscription
  • Certificate - specify Name from step 5
  • Auth - specify sha1
  • Cipher - specify aes256
  • Add default route - automatic route addition, enable the checkbox
Next
Setting up OpenVPN on RouterOS, step 7 Setting up OpenVPN on RouterOS, step 7
8
Click Apply and make sure that the status of connection is "connected".
If the connection is not established, try to specify a different connection server, or use another protocol (L2TP or PPTP).
Next
Setting up OpenVPN on RouterOS, step 8 Setting up OpenVPN on RouterOS, step 8
9
Go to IP - Firewall, open NAT tab, click Add New.
Next
Setting up OpenVPN on RouterOS, step 9 Setting up OpenVPN on RouterOS, step 9
10
In the Out. Interface field specify the OpenVPN interface created in step 7. Select masquerade in the Action field, then click OK (for convenience, the other options are not shown in the screenshot).
Next
Setting up OpenVPN on RouterOS, step 10 Setting up OpenVPN on RouterOS, step 10
11
If your Internet connection type is PPPoE, go to the Interfaces tab and click on the interface line with the PPPoE Client type.
Next
Setting up OpenVPN on RouterOS, step 11 Setting up OpenVPN on RouterOS, step 11
12
Set the Default Route Distance to 10 and click OK.
Next
Setting up OpenVPN on RouterOS, step 12 Setting up OpenVPN on RouterOS, step 12
13
If your Internet connection type is IPoE, go to the IP -> Routes. At the top of the route list we see two routes with Dst. Address 0.0.0.0/0. The first route for our VPN traffic is inactive, as indicated by the absence of the letter A in the DS string. You also need to make sure that in the Gateway field for this route is specified "reacheble". The second route is standard, and it is active, as indicated by the letter A in the DAS line. In order for our traffic to go through the VPN, we need to lower the priority of the standard route by setting its Distance to 10. To do this, you need to remember the address of the gateway specified in the Gateway. In the screenshot, the gateway address is 192.168.1.1, it may be different for you. Next, click on the Add New button.
Next
Setting up OpenVPN on RouterOS, step 13 Setting up OpenVPN on RouterOS, step 13
14
In the Gateway field specify the gateway address from the previous step, in the Distance set 10 and click OK.
Next
Setting up OpenVPN on RouterOS, step 14 Setting up OpenVPN on RouterOS, step 14
15
We see that in the route table have two identical routes with different Distance fields. Now delete a route with Distance 1 by clicking on “–” button. Now all traffic goes through the VPN tunnel and this completes the setup.
To top
Setting up OpenVPN on RouterOS, step 15 Setting up OpenVPN on RouterOS, step 15

注册


E-mail
语言
密码
确认密码

支持和反馈