Community discussions

MikroTik App
 
safeit
just joined
Topic Author
Posts: 4
Joined: Tue Mar 05, 2024 1:23 am

WANGUARD DUAL WAN HA

Tue Mar 05, 2024 1:40 am

Hello, I have two offices connected by wireguard via WAN 1. Recently, I added a second backup connection to each location.
Is it possible to achieve high availability on Mikrotik to create 4 connections? so that each link has 2 peers? I will put a dynamic routing protocol on top of everything and this would ensure high availability. The question is whether it is possible to create such routing policies that each peer enters and exits through the appropriate connection.
Bez tytułu.png
You do not have the required permissions to view the files attached to this post.
 
User avatar
Larsa
Forum Guru
Forum Guru
Posts: 1068
Joined: Sat Aug 29, 2015 7:40 pm
Location: The North Pole, Santa's Workshop

Re: WANGUARD DUAL WAN HA

Tue Mar 05, 2024 2:19 am

I've done it myself so there should be no problem at all using OSPF and optional BFD for fast failover.

Another option is to use ZeroTier which automatically utilizes all available links and also enables easy access from mobile devices, home offices, etc.
 
safeit
just joined
Topic Author
Posts: 4
Joined: Tue Mar 05, 2024 1:23 am

Re: WANGUARD DUAL WAN HA

Tue Mar 05, 2024 8:46 am

thanks for the answer. How did you go about configuring routing policies for multiple vans? I have set incoming connection marking and routing marking for the appropriate WAN link, but it does not work for wireguard because during the handshake, the peer that responds to the query sends traffic through the default gateway.
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 19401
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: WANGUARD DUAL WAN HA

Wed Mar 06, 2024 1:07 am

Concur sounds like an OSPF+BDF exercise to detect drops and to direct traffic to remaining connection.
Not having used zerotier that may be much easier,,,,,albeit through third party technically.
 
User avatar
Larsa
Forum Guru
Forum Guru
Posts: 1068
Joined: Sat Aug 29, 2015 7:40 pm
Location: The North Pole, Santa's Workshop

Re: WANGUARD DUAL WAN HA

Wed Mar 06, 2024 1:49 am

thanks for the answer. How did you go about configuring routing policies for multiple vans? I have set incoming connection marking and routing marking for the appropriate WAN link, but it does not work for wireguard because during the handshake, the peer that responds to the query sends traffic through the default gateway.

Yeah, the WireGuard implementation is flawed,so you need to force the reply back to the originating WAN interface by using policy routing, i.e., create a separate routing table, e.g., "ether2", add a default gateway for the WAN interface to the new routing table, and lastly, add a routing rule like add src-address=WAN-IP table=ether2 action=lookup.

EDIT: btw, you can skip the mangeling stuff since you only have to use policy routing to make WireGuard work in a dual wan environment.

Who is online

Users browsing this forum: Amazon [Bot], ariux, Techsystem and 34 guests