OPNsense Forum

Archive => 22.1 Legacy Series => Topic started by: nam wanda on May 03, 2022, 06:32:15 PM

Title: Wireguard not reconnecting when remote IP change
Post by: nam wanda on May 03, 2022, 06:32:15 PM
Hi all,
I have an issue with a Wireguard site-to-site VPN.

Here is the situation:
- I have two OPNsense boxes (A and B).
- I set up box A a dynamic DNS service.
- Box B is behind a provider NAT, and I can't reach from outside.
- I set up Wireguard in both machines to have box B connect to box A.
- Everything works perfectly but:
when the IP of box A changes, the Dynamic DNS is updated, but the connection between the two boxes is not restored until I reboot box B (I haven't tested rebooting only Wierguard service at the moment).

Where is the problem?
How can I solve that?
May I add a script to reboot Wireguard when the remote IP changes or try to force it to reconnect when it loses the connection?

Thank you.
best,

เว็บพนันแทงบอล (https://socialmediaandemploymentlaw.com/%E0%B9%80%E0%B8%A7%E0%B9%87%E0%B8%9A%E0%B8%9E%E0%B8%99%E0%B8%B1%E0%B8%99%E0%B9%81%E0%B8%97%E0%B8%87%E0%B8%9A%E0%B8%AD%E0%B8%A5/)
Title: Re: Wireguard not reconnecting when remote IP change
Post by: meyergru on May 03, 2022, 08:35:44 PM
Look here: https://github.com/opnsense/plugins/pull/2956