diff --git a/templates/wg.conf b/templates/wg.conf index f4b1981..af685cf 100644 --- a/templates/wg.conf +++ b/templates/wg.conf @@ -20,5 +20,5 @@ PostDown = {{ .serverConfig.Interface.PostDown }} [Peer] PublicKey = {{ .Client.PublicKey }} PresharedKey = {{ .Client.PresharedKey }} -AllowedIPs = {{$first :=true}}{{range .Client.AllocatedIPs }}{{if $first}}{{$first = false}}{{else}},{{end}}{{.}}{{end}} +AllowedIPs = {{$first :=true}}{{range .Client.AllocatedIPs }}{{if $first}}{{$first = false}}{{else}},{{end}}{{.}}{{end}}{{$first :=true}}{{range .Client.AllowedIPs }}{{if ne . "0.0.0.0/0" }},{{.}}{{end}}{{end}} {{end}}{{end}}