Browse Source
fix server config
missing cidr block in server config
pull/1349/head
Bernd Storath
2 years ago
No known key found for this signature in database
GPG Key ID: D6C85685A555540F
1 changed files with
4 additions and
1 deletions
-
src/server/utils/WireGuard.ts
|
|
|
@ -19,6 +19,9 @@ class WireGuard { |
|
|
|
async #saveWireguardConfig() { |
|
|
|
const system = await Database.getSystem(); |
|
|
|
const clients = await Database.getClients(); |
|
|
|
const cidrBlock = ip.cidrSubnet( |
|
|
|
system.userConfig.addressRange |
|
|
|
).subnetMaskLength; |
|
|
|
let result = ` |
|
|
|
# Note: Do not edit this file directly. |
|
|
|
# Your changes will be overwritten! |
|
|
|
@ -26,7 +29,7 @@ class WireGuard { |
|
|
|
# Server |
|
|
|
[Interface] |
|
|
|
PrivateKey = ${system.interface.privateKey} |
|
|
|
Address = ${system.interface.address} |
|
|
|
Address = ${system.interface.address}/${cidrBlock} |
|
|
|
ListenPort = ${system.wgPort} |
|
|
|
PreUp = ${system.iptables.PreUp} |
|
|
|
PostUp = ${system.iptables.PostUp} |
|
|
|
|