luckman212 / wgfix

2 stars 0 forks source link

wgfix v2.2.0

Install Instructions

  1. Apply commit cb710c066a0fdf11e5aac107d6b9cd12f9286d82 using System Patches
  2. Since I haven't figured out how to make System Patches/git mark the script as executable, you're going to have to manually log in via console or ssh and type chmod +x /etc/wgfix.sh. You can also run this command via Diagnostics → Command Prompt → Execute Shell Command.
  3. Add @ to the end of the description of any peers that you want to fail back after WANUP events, e.g. rename my_peermy_peer@

Testing

Force a failover event (unplug Ethernet cable, shut off modem, etc) and wait for your Wireguard tunnel to migrate to the secondary WAN. Then, restore the primary WAN and wait for the gateway status to be "Online" with 0% loss. This should trigger a fail-back to occur automatically.

You can also manually test the script via console/ssh:

/etc/wgfix.sh <GW_NAME> 0