Setting Up VPN Connection via L2TP/IPsec for Mikrotik

To set up a VPN connection via L2TP/IPsec on Mikrotik devices, download the Winbox application from the link https://mt.lv/winbox64 - 64-bit or https://mt.lv/winbox - 32-bit. You can also configure it via the web interface or terminal.
After connecting to your Mikrotik router using Winbox, open the PPP menu section, go to the Interface tab and create a new connection by clicking L2TP Client in the drop-down list:

In the window that opens, on the General tab, specify the name of the connection in the Name field, for example, Hostetski:), and go to the Dial Out tab. Fill in the following fields, taking the information from the message that you received by email when activating the service (the message is also available at the link https://my.hostetski.com/billing.php?do=maillogs in your account):

Connect To - server IP address (VPS),
User - PPTP/L2TP username,
Password - PPTP/L2TP password,
IPsec Secret - IPsec shared PSK - if the Mikrotik device is behind NAT, for example, if the provider issues a gray address, IPsec may not be supported - do not check the Use IPsec checkbox in this case,
Add Default Route - check the box if you want all traffic to go through this VPN connection.

After filling in the fields, click Apply and go to the Status tab, where you will see the type of traffic encryption (Encoding), the received IP address, and the connection status:

If there is no connection (the connecting status does not change to connected for a long time), and the connection is disconnected after the following lines in the connection log (Log menu):
ISAKMP-SA established XXX.XXX.XXX.XXX[4500]-XXX.XXX.XXX.XXX[4500] spi:44ac40fad4cfbee2:a041fc516553f73e
initiate new phase 1 (Identity Protection): XXX.XXX.XXX.XXX[500]<=>XXX.XXX.XXX.XXX[500]
Open the IP menu section, then select the IPsec in the drop-down menu, go to the Proposals tab, double-click on the line with the default name, check the sha256 authorization algorithm, and click OK:

Reconnection with new parameters will happen automatically after some time - connection status will change to connected in case of a successful connection.
If you have additional questions, you can use our ticket system.