OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • Virtual private networks »
  • Wireguard 2 WANs IP
« previous next »
  • Print
Pages: [1]

Author Topic: Wireguard 2 WANs IP  (Read 466 times)

mic

  • Newbie
  • *
  • Posts: 24
  • Karma: 1
    • View Profile
Wireguard 2 WANs IP
« on: July 26, 2024, 05:22:02 pm »
Hello,

I have the following configuration:
  • Virtualized OPNSense in a DC witn 1 Static Public IP: a.b.c.d
  • An Hardware OPNSense in the Customer Headquarter with 2 WAN (different ISPs) Connections and therefore 2 WANs IPs Addresses (say e.f.g.h and i.j.k.l)
Now in the Customer HQ the first WAN Connection is the primary and the second WAN is the backup. I configured a Wireguard tunnel between DC OPNSense and HQ OPNSense using as peer endpoint IP address (in DC OPNSense) e.f.g.h (primary WAN IP of the HQ OPNSense). Now if the primary WAN connection of the HQ goes down also the Wireguard tunnel goes down because, in the Virtual OPNSense in DC, Wireguard endpoint peer address is set to e.f.g.h (primary WAN  IP address of HQ Connection).
Now the question is: how can I configure, in Virtual OPNSense in DC, a second endpoint peer address ( i.j.k.l) as backup, so if the HQ primary WAN ISP goes down the Wireguard tunnel switch versus the secondary WAN using as peer endopint IP address i.j.k.l ?

Thank you
« Last Edit: July 26, 2024, 05:39:25 pm by mic »
Logged

Monviech (Cedrik)

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1662
  • Karma: 178
    • View Profile
Re: Wireguard 2 WANs IP
« Reply #1 on: July 26, 2024, 07:29:14 pm »
You could initialize the Wireguard connection from the site with dual WAN, to the site with single WAN. In the single WAN site put no endpoint address, that way it will wait for one of the dual WAN sites IPs to connect to it.

If the IP changes, it should not matter, since Wireguard is set up to be stateless.
Logged
Hardware:
DEC740

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • Virtual private networks »
  • Wireguard 2 WANs IP
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2