3 Node Wireguard VPN

I'd like to setup 3 Wireguard VPN servers that share the same configation (port number, clients, etc, etc.)

For load balancing I'll use basic DNS (1 record, 3 ip addresses) - I know this has no heartbeat, etc.

For setup I'll just use @Nyr awesome script.

For syncing I'm thinking simple rsync would work just fine.

What's the best way to reload the wireguard config when I add new clients, etc? No downtime would be cool. I simple crontab that reloads it every so often would work as well.

Any thoughts? What am I missing?

Comments

  • edited May 2022
    wg syncconf wg0 <(wg-quick strip wg0)
    
    Thanked by (2)AaronSS saibal
  • In case it needs clarification, the script will deal with this on the master server (using a different and more complex approach, but does not matter).

    For the slaves: cron + rsync + the one liner provided by @ralf is enough. No need to check if there are changes in advance, you can run wg syncconf every time as it will only act when changes are required.

    Thanked by (1)AaronSS
Sign In or Register to comment.