Community discussions

MikroTik App
 
User avatar
rules
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 65
Joined: Tue Feb 19, 2019 12:10 pm
Location: Cape Town, South Africa

L2TP/IPsec connection without sharing internet

Thu Feb 21, 2019 8:56 am

Hi All

I configured our RB931 to connect to a remote L2TP server, which works fine, but I would prefer if all internet traffic did not go across the tunnel as well. I remember on Windows there was an option to unselect (something about remote gateway). How would I do this on our Mikrotik?

Thanks,
R
 
User avatar
Steveocee
Forum Guru
Forum Guru
Posts: 1120
Joined: Tue Jul 21, 2015 10:09 pm
Location: UK
Contact:

Re: L2TP/IPsec connection without sharing internet  [SOLVED]

Thu Feb 21, 2019 12:32 pm

You can use mangle to add routing marks then set the appropriate routing marks in your IP>Routes.

Use mangle to identify either src or destination and then apply either an "in-vpn" or "out-vpn" mark to it.
I use very similar to identify specific LAN devices to be able to use my work VPN.
 
nostromog
Member Candidate
Member Candidate
Posts: 226
Joined: Wed Jul 18, 2018 3:39 pm

Re: L2TP/IPsec connection without sharing internet

Thu Feb 21, 2019 12:39 pm

Hi All

I configured our RB931 to connect to a remote L2TP server, which works fine, but I would prefer if all internet traffic did not go across the tunnel as well. I remember on Windows there was an option to unselect (something about remote gateway). How would I do this on our Mikrotik?

Thanks,
R
I imagine you did something like
/interface l2tp-client
add connect-to=<site> disabled=no name=myvpn use-ipsec=yes user=<user>
If you say something like
/interface l2tp-client set myvpn add-default-route=no
/ip route add dst-address=<internal-network1> gateway=myvpn
/ip route add dst-address=<internal-network2> gateway=myvpn
It will only be used for the routed networks.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19323
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: L2TP/IPsec connection without sharing internet

Thu Feb 21, 2019 6:25 pm

Stevo, that seems to be a typical scenario.
1. VPN to a server external to the router (as the chap indicated, but he want to ensure not all traffic going out the router uses this l2tp connection.
2. VPN to a server internal to the router (from coffee shop to home to use home internet outbound and thus the routers fw etc)

Do you have any fancy youtube vids for those scenarios?
(plus @steve when you get a chance can you comment here ....... viewtopic.php?f=7&t=145527)
 
User avatar
rules
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 65
Joined: Tue Feb 19, 2019 12:10 pm
Location: Cape Town, South Africa

Re: L2TP/IPsec connection without sharing internet

Thu Feb 21, 2019 9:06 pm

Hi Steve

Thanks, worked like a charm. I modified the Mangle rule I created while setting up the VPN (following someone else's tutorial :wink: ) and basically specified the remote network's IP range to be tagged as VPN data. I'm assuming this means it leaves all other data this side.

Furthering network knowledge is one thing ... doing it with Mikrotik feels like starting out mountain climbing with Everest :lol:
You can use mangle to add routing marks then set the appropriate routing marks in your IP>Routes.

Use mangle to identify either src or destination and then apply either an "in-vpn" or "out-vpn" mark to it.
I use very similar to identify specific LAN devices to be able to use my work VPN.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19323
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: L2TP/IPsec connection without sharing internet

Thu Feb 21, 2019 9:26 pm

Well you know there are many dead bodies littering the slopes of MT Everest, so I think you may be onto something! ;-)
 
evasilev
just joined
Posts: 1
Joined: Tue Apr 28, 2020 2:43 pm

Re: L2TP/IPsec connection without sharing internet

Tue Apr 28, 2020 3:36 pm

Hello guys,
Please provide me some tutorial with solution of this case.
I have exactly the same need.
Please notify that I am beginner in mikrotik setup but with several tutorials and videos in youtube the result is following.
I have the following configuration scenario:
2 internet providers , 3 internal networks (internal Main, guest over WiFi, video surveillance) , VPN L2TP/IPsec
1port - Main ISP
2port - backup ISP
3port - internal network ->Main ISP + guest network(wifi Access points) over vlan -> backup ISP
4port - internal network ->Main ISP + guest network(wifi Access points) over vlan -> backup ISP
5port - video surveillance -> backup ISP

if Main ISP disappears or if I disable 1port -> all Internet traffic goes thru backup ISP without interruption
I'm not 90% :-) sure that my configuration is accurate as it should but it works some how.
I saw issue with video surveillance - traffic flows over Main ISP and I don't know why.
And second problem is related to this topic.
I want VPN users connected from out side to use their own providers for internet.
thank you in advance !

Who is online

Users browsing this forum: jaclaz, jstaw and 53 guests