From 0f7ea82d8b1e5070daef9e549b390c731712aee3 Mon Sep 17 00:00:00 2001 From: Callan Bryant Date: Mon, 19 Oct 2020 19:25:56 +0100 Subject: [PATCH] correct preshared-key association --- add.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/add.go b/add.go index 3626dab..7c30ff0 100644 --- a/add.go +++ b/add.go @@ -27,7 +27,6 @@ const vyattaPeerConf = `configure set interfaces wireguard wg0 address {{ .Peer.IP }}/{{ .Cidrmask }} set interfaces wireguard wg0 route-allowed-ips true set interfaces wireguard wg0 private-key {{ .Peer.PrivateKey.Key }} -set interfaces wireguard wg0 preshared-key {{ .Peer.PresharedKey.Key }} {{- if .DsnetConfig.DNS }} #set service dns forwarding name-server {{ .DsnetConfig.DNS }} {{ end }} @@ -35,6 +34,7 @@ set interfaces wireguard wg0 preshared-key {{ .Peer.PresharedKey.Key }} set interfaces wireguard wg0 peer {{ .DsnetConfig.PrivateKey.PublicKey.Key }} endpoint {{ .DsnetConfig.ExternalIP }}:{{ .DsnetConfig.ListenPort }} set interfaces wireguard wg0 peer {{ .DsnetConfig.PrivateKey.PublicKey.Key }} allowed-ips {{ .AllowedIPs }} set interfaces wireguard wg0 peer {{ .DsnetConfig.PrivateKey.PublicKey.Key }} persistent-keepalive {{ .Keepalive }} +set interfaces wireguard wg0 peer {{ .DsnetConfig.PrivateKey.PublicKey.Key }} preshared-key {{ .Peer.PresharedKey.Key }} commit; save `