Community discussions

MikroTik App
 
bman87
just joined
Topic Author
Posts: 7
Joined: Mon Jan 15, 2018 8:09 pm

Route WAN traffic over IPSec tunnel possible?

Thu Jan 18, 2018 5:13 pm

Hello,

I have rOS on both sides of this VPN.

Here is the setup I am trying:

Client: LAN - 10.0.0.0/16
Server: LAN - 192.168.66.0/24

IPSec policy set up to encrypt between 10.0.0.0/16 and 192.168.66.0/24

This seems to be working, I can ping 192.168.66.1 from anything on my 10.0/16 network.

I add a route on the client side that looks like this: 0.0.0.0/0 - GW: 192.168.66.1
This does not seem to work, I don't think that route is passing the traffic down the IPSec tunnel.

This guide looked promising, but it looks like it isn't complete and lacks the next step of information I am looking for.
https://wiki.mikrotik.com/wiki/Routing_ ... over_IPsec

I am trying to avoid the overhead of GRE,IPIP,L2TP, etc.. and would like to use IPSec only if possible. I have searched around but have not been able to find any answers to this.

Thanks!
 
User avatar
evince
Member
Member
Posts: 355
Joined: Thu Jul 05, 2012 12:11 pm
Location: Harzé - Belgique
Contact:

Re: Route WAN traffic over IPSec tunnel possible?

Thu Jan 18, 2018 5:28 pm

Hello,
did u masquerade 10.0.0.0/16 in the second router?
 
bman87
just joined
Topic Author
Posts: 7
Joined: Mon Jan 15, 2018 8:09 pm

Re: Route WAN traffic over IPSec tunnel possible?

Thu Jan 18, 2018 5:38 pm

Hello,
did u masquerade 10.0.0.0/16 in the second router?
No I did not. I will give that a try next chance I get to work on this again. You mean on the 'server' router with the LAN address 192.168.66.1?
 
User avatar
evince
Member
Member
Posts: 355
Joined: Thu Jul 05, 2012 12:11 pm
Location: Harzé - Belgique
Contact:

Re: Route WAN traffic over IPSec tunnel possible?

Thu Jan 18, 2018 5:43 pm

Of course, because this network is maybe not authorized to masquerade.I've this setup, but with gre over ipsec
 
User avatar
sebastia
Forum Guru
Forum Guru
Posts: 1782
Joined: Tue Oct 12, 2010 3:23 am
Location: Antwerp, BE

Re: Route WAN traffic over IPSec tunnel possible?

Thu Jan 18, 2018 7:48 pm

Hi

Client
the gateway defined on the client side must be reachable to clients -> needs to be on same network.
This should be the RB on the 10...-side.
Within that RB you then should define a default gw to 192.168... and with ipsec config to encrypt that traffic that will work fine.

Server
RB there should have a route defined to 10. as well, to forward traffic to RB on client side.
and the devices in that network should have that RB as default router.

No need for any masquerade.


pc client           ----------    RB client            -------          RB server          -------          server pc
gw: 10.0.0.1                lan ip:10.0.0.1                        lan ip: 192.168.66.1                    gw: 192.168.66.1
                         route 192.. -> RB server                 route 10... -> RB client
 
bman87
just joined
Topic Author
Posts: 7
Joined: Mon Jan 15, 2018 8:09 pm

Re: Route WAN traffic over IPSec tunnel possible?

Thu Jan 18, 2018 10:36 pm

Thank you, I will try this and report back. I think I have pretty much everything you have listed except for the route on the RB Server side.
 
Sob
Forum Guru
Forum Guru
Posts: 9121
Joined: Mon Apr 20, 2009 9:11 pm

Re: Route WAN traffic over IPSec tunnel possible?

Thu Jan 18, 2018 11:56 pm

IPSec policy set up to encrypt between 10.0.0.0/16 and 192.168.66.0/24
If you do this, then only traffic between 10.0.0.0/16 and 192.168.66.0/24 will pass through IPSec tunnel, nothing else. That's the problem with plain IPSec tunnels, they don't work like "normal" tunnels where you have regular interface and you can use it to route any traffic you want. IPSec tunnels are "magic". Packets to remote network look like they will go towards your default gateway (ISP's device), but before it happens, they get "stolen" by IPSec, encrypted and then sent to remote SA address (where they are decrypted and continue further).

You can play with routes as much as you want, but it won't do anything, because if packet from 10.0.0.0/16 won't go to 192.168.66.0/24 (or other way around), it won't match the policy and IPSec won't take it. That's why people use IPIP or GRE inside transport mode IPSec, instead of plain tunnel mode IPSec, it makes everything much easier.

To make it work with plain IPSec tunnel, you'd need to make policy with 10.0.0.0/16 on client side and 0.0.0.0/0 on server side. That's unless you use NAT. And assuming I understood correctly what you want. You don't give further details about what exactly are you trying to do (big picture), so it may need something more than just this.
 
bman87
just joined
Topic Author
Posts: 7
Joined: Mon Jan 15, 2018 8:09 pm

Re: Route WAN traffic over IPSec tunnel possible?

Fri Jan 19, 2018 12:45 am

Thanks for the insight. Hopefully I can figure this one out.

Hardware: hEX RB750Gr3
The big picture: My home internet is 300mbps, I want to route my WAN traffic through the VPN. A couple weeks ago I had 60mbps internet and using a L2TP/IPSec tunnel was working great.

The problem: I can only reach about 100mbps with the L2TP/IPSec tunnel. I was told that the L2TP overhead was bottle necking CPU on the router. I know the CPU and connection on the server side can handle L2TP/IPsec at 300mbps since I can connect my home PC to the tunnel and pull 300mbps down.

The RB750Gr3 shows it can handle 400mbps IPSec on the spec sheet, so I am trying to achieve that by not using L2TP. I tried GRE+IPSec and was only able to pull about 60mbps for some reason.
 
bman87
just joined
Topic Author
Posts: 7
Joined: Mon Jan 15, 2018 8:09 pm

Re: Route WAN traffic over IPSec tunnel possible?

Fri Jan 19, 2018 1:17 am

I just set up a GRE tunnel without IPSec and I cannot get past 60mbps. I watched the profiler on both server and client and the CPU usage is very minimal. Maybe GRE is my solution if I could figure out why I can't get it past 60mbps
 
User avatar
sopro
just joined
Posts: 24
Joined: Thu Jan 21, 2016 7:19 pm
Location: Santiago, Chile
Contact:

Re: Route WAN traffic over IPSec tunnel possible?

Fri Jan 19, 2018 2:51 am

IPSec policy set up to encrypt between 10.0.0.0/16 and 192.168.66.0/24
If you do this, then only traffic between 10.0.0.0/16 and 192.168.66.0/24 will pass through IPSec tunnel, nothing else. That's the problem with plain IPSec tunnels, they don't work like "normal" tunnels where you have regular interface and you can use it to route any traffic you want. IPSec tunnels are "magic". Packets to remote network look like they will go towards your default gateway (ISP's device), but before it happens, they get "stolen" by IPSec, encrypted and then sent to remote SA address (where they are decrypted and continue further).

You can play with routes as much as you want, but it won't do anything, because if packet from 10.0.0.0/16 won't go to 192.168.66.0/24 (or other way around), it won't match the policy and IPSec won't take it. That's why people use IPIP or GRE inside transport mode IPSec, instead of plain tunnel mode IPSec, it makes everything much easier.

To make it work with plain IPSec tunnel, you'd need to make policy with 10.0.0.0/16 on client side and 0.0.0.0/0 on server side. That's unless you use NAT. And assuming I understood correctly what you want. You don't give further details about what exactly are you trying to do (big picture), so it may need something more than just this.

Hi Sob,

Can you help me with my problem please?: viewtopic.php?f=2&t=129703

Please, thanks a lot.
 
draguzet
Frequent Visitor
Frequent Visitor
Posts: 75
Joined: Fri Jul 01, 2011 10:28 am

Re: Route WAN traffic over IPSec tunnel possible?

Sun Feb 24, 2019 4:06 pm

I just set up a GRE tunnel without IPSec and I cannot get past 60mbps. I watched the profiler on both server and client and the CPU usage is very minimal. Maybe GRE is my solution if I could figure out why I can't get it past 60mbps
Hi !
Same problem by me, have you solved IPSEC or any tunnel with Full speed problem ?
Thanks

Who is online

Users browsing this forum: 2specelevate, mszru, sebol1204 and 68 guests