Community discussions

MikroTik App
 
dakotabcn
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 52
Joined: Thu Apr 21, 2016 11:16 pm

send route to vpn l2tp

Wed Apr 06, 2022 10:18 am

Hello!
I have spent days investigating how to send a route to a user who connects with an L2TP VPN
When the user connects he receives the IP 10.10.0.2, I want to tell him when he connects to his windows 10 that all traffic to 192.168.30.64/28 use as GW 10.10.10.1 but I can't find how to send it
Is there any way to do it? The Mikrotik has version 7.1.5 installed, is there an option even if it is not L2TP?
regards
 
tdw
Forum Guru
Forum Guru
Posts: 2107
Joined: Sat May 05, 2018 11:55 am

Re: send route to vpn l2tp

Wed Apr 06, 2022 2:13 pm

You cannot push routes directly, Windows uses DHCP once the L2TP connection is established to retrieve additional routes. It may be possible to use L2TP-server bindings and create a DCHP server for each to do this on a Mikrotik, although I have not tried it.

You can add static routes to VPN connections in Windows 10 with PowerShell, e.g. Add-VpnConnectionRoute -ConnectionName "VPN Connection Name" -DestinationPrefix 192.168.30.64/28 - the command is only required once, then when the VPN is connected the additional route is added and when disconnected the route removed.
Last edited by tdw on Wed Apr 06, 2022 9:52 pm, edited 1 time in total.
 
User avatar
sindy
Forum Guru
Forum Guru
Posts: 11425
Joined: Mon Dec 04, 2017 9:19 pm

Re: send route to vpn l2tp

Wed Apr 06, 2022 7:14 pm

What Windows sends in order to obtain a routing table is a specific DHCP message, DHCPINFORM. It is not possible to attach a DHCP server to an L3 interface, and despite its name, L2TP only supports L2 tunnels if both the server and the client support it.

As far as I know, Mikrotik only responds DHCPINFORM for bare IKEv2 connections from Windows (and in some less common configurations it doesn't work even in this case). I haven't noticed a change in ROS 7.