correct preshared-key association

This commit is contained in:
Callan Bryant 2020-10-19 19:25:56 +01:00
parent ce9091e8bc
commit 0f7ea82d8b
No known key found for this signature in database
GPG Key ID: C31FA9DF3ACBFFAA

2
add.go
View File

@ -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
`