diff --git a/.gitignore b/.gitignore index cf1185f..3b740db 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ config.json out/ +wg_generate diff --git a/gen.go b/gen.go index d11e54f..48b3551 100644 --- a/gen.go +++ b/gen.go @@ -45,7 +45,7 @@ func generateConfigs(storage *Storage) { serverConfig := "" serverConfig += "[Interface]\n" serverConfig += fmt.Sprintf("ListenPort = %d\n", storage.Port) - serverConfig += fmt.Sprintf("Address = %s1/32,%s1/128\n", storage.Subnet, storage.Subnet6) + serverConfig += fmt.Sprintf("Address = %s1/24,%s1/68\n", storage.Subnet, storage.Subnet6) serverConfig += fmt.Sprintf("PrivateKey = %s\n", storage.Server.Private) if len(storage.Server.IPTablesUp) > 0 { @@ -78,7 +78,7 @@ func generateConfigs(storage *Storage) { peerConfig += fmt.Sprintf("[Peer] # Server\n") peerConfig += fmt.Sprintf("PublicKey = %s\n", storage.Server.Public) if !peer.OnlySubnet { - peerConfig += fmt.Sprintf("AllowedIPs = 0.0.0.0/0, ::0/0\n") + peerConfig += fmt.Sprintf("AllowedIPs = 0.0.0.0/0, ::/0\n") } else { peerConfig += fmt.Sprintf("AllowedIPs = %s0/24, %s0/68\n", storage.Subnet, storage.Subnet6) }