M
M
Michael2022-03-11 21:48:50
Mikrotik
Michael, 2022-03-11 21:48:50

How to configure Mikrotik so that it automatically picks up the route to a remote network?

The situation is as follows: there is a Windows 10 computer connected to Mikrotik hAP Lite (RB941-2nD), RouterOS v6.45.8

Internet connection via PPPoE.

Windows successfully establishes an L2TP connection to the corporate network, receives routes and DNS suffixes via DHCP. Thus, when I write on the command line , the ping gitlab.{company}.appcomputer successfully resolves the hostname to an address like 10.10.10.50 and establishes a connection with it. From the output tracert, I clearly see that the packets go to the corporate network and to the Internet along different routes (that is, the VPN in the corporate network is not the default gateway)

I want the same thing to happen on Mikrotik. That is, so that the router (and not the computer) raises the L2TP connection and resolves the traffic - this one to the Internet (that is, to the PPPoE interface), and this one to the corporate network (that is, to L2TP).

I found how to set up L2TP, the connection is established. But how to make Mikrotik pick up routes to the corporate network and DNS from there just like Windows - I can’t figure it out yet. Can you please tell me the best way to do this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Michael, 2022-03-12
@Akela_wolf

With the help of Drno, the problem was solved as follows:

  1. Update RouterOS version to 6.49.4 (7.1.3 was unstable, I didn't like it. I did a downgrade)
  2. Set the Use Peer DNS = exclusive flag in the L2TP interface settings
  3. In IP / Routes, register routes to the corporate network through the L2TP interface
  4. Add L2TP interface to WAN group (for NAT to work)

As a result, all DNS queries go through corporate DNS servers.
However, traffic is routed normally - corporate traffic in L2TP, the rest - to the Internet.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question