Community discussions

MikroTik App
 
mimk97
just joined
Topic Author
Posts: 10
Joined: Wed Mar 13, 2019 10:16 am

VPN Connect 2 Locations and a few Clients ?

Thu Mar 28, 2019 10:27 am

Hi,
i want to connect 2 Locations with VPN.
And also Clients to this Locations.
How can i do this?

Is there a Howto?
 
User avatar
cdiedrich
Forum Veteran
Forum Veteran
Posts: 997
Joined: Thu Feb 13, 2014 2:03 pm
Location: Basel, Switzerland // Bremen, Germany
Contact:

Re: VPN Connect 2 Locations and a few Clients ?

Thu Mar 28, 2019 3:21 pm

This Section of the IPsec manual is pretty comprehensive and should exactly do what you want to accomplish.

Since IPsec is a cpu-hog, I'd advise to use it on routers with h/w acceleration olnly (all CCR series, 1100AHx4, RG750Gr3, RB3011).

-Chris
 
mimk97
just joined
Topic Author
Posts: 10
Joined: Wed Mar 13, 2019 10:16 am

Re: VPN Connect 2 Locations and a few Clients ?

Thu Mar 28, 2019 3:43 pm

Thanks Chris,
i will try it

Update:
I configured Site 1 and 2 exact like this Manual.
Except Client Peer add address =n.mynetname.net , changed to my actual public IP of Site 1

Now i get "ipsec ipsec-: connect (Network is unreachable)" on Site 2
What´s wrong?

Have forwarded Port 500 and 4500 UDP on Site 1
 
mimk97
just joined
Topic Author
Posts: 10
Joined: Wed Mar 13, 2019 10:16 am

Re: VPN Connect 2 Locations and a few Clients ?

Fri Mar 29, 2019 11:38 am

Ok, now it works. The Destination DNS didn´t work correctly.
I put now IP instead the Name

Chris, but how can i reach the local Subnet (192.168.1.0 and 192.168.10.0)?
 
User avatar
cdiedrich
Forum Veteran
Forum Veteran
Posts: 997
Joined: Thu Feb 13, 2014 2:03 pm
Location: Basel, Switzerland // Bremen, Germany
Contact:

Re: VPN Connect 2 Locations and a few Clients ?

Fri Mar 29, 2019 12:01 pm

Now that's a good start.
All that's left is adding routes through the tunnel.

Assuming 192.168.1.0/24 is on the tunnel local IP of 192.168.99.1
and 192.168.10.0/24 is on the tunnel local IP of 192.168.99.2

do this:
#on router 1
/ip route
add dst-address=192.168.1.0/24 gateway=192.168.99.1 distance=20

#on router 2
/ip route
add dst-address=192.168.10.0/24 gateway=192.168.99.2 distance=20

And you should be good to go.
-Chris
 
mimk97
just joined
Topic Author
Posts: 10
Joined: Wed Mar 13, 2019 10:16 am

Re: VPN Connect 2 Locations and a few Clients ?

Fri Mar 29, 2019 12:25 pm

Sounds good, i will try it.
And this Configuration is secure with Android Clents for Example?
 
mimk97
just joined
Topic Author
Posts: 10
Joined: Wed Mar 13, 2019 10:16 am

Re: VPN Connect 2 Locations and a few Clients ?

Fri Mar 29, 2019 12:46 pm

Now that's a good start.
All that's left is adding routes through the tunnel.

Assuming 192.168.1.0/24 is on the tunnel local IP of 192.168.99.1
and 192.168.10.0/24 is on the tunnel local IP of 192.168.99.2

do this:
#on router 1
/ip route
add dst-address=192.168.1.0/24 gateway=192.168.99.1 distance=20

#on router 2
/ip route
add dst-address=192.168.10.0/24 gateway=192.168.99.2 distance=20

And you should be good to go.
-Chris
I´ve done this Configuration.
But on Route List it shows "192.168.99.2 unreachable"
gre-tunnel.jpg
route-list.jpg
You do not have the required permissions to view the files attached to this post.
 
mimk97
just joined
Topic Author
Posts: 10
Joined: Wed Mar 13, 2019 10:16 am

Re: VPN Connect 2 Locations and a few Clients ?

Sat Mar 30, 2019 12:40 pm

Could someone help me, please :(

Who is online

Users browsing this forum: Airiasas and 18 guests