Browse Source

Update WireGuard.js

pull/190/head
SirNoish 3 years ago
committed by GitHub
parent
commit
c535b87bac
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/lib/WireGuard.js

4
src/lib/WireGuard.js

@ -84,7 +84,9 @@ module.exports = class WireGuard {
[Interface] [Interface]
PrivateKey = ${config.server.privateKey} PrivateKey = ${config.server.privateKey}
Address = ${config.server.address}/24 Address = ${config.server.address}/24
ListenPort = 51820`; ListenPort = 51820
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -o ovs_eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o ovs_eth0 -j MASQUERADE`;
for (const [clientId, client] of Object.entries(config.clients)) { for (const [clientId, client] of Object.entries(config.clients)) {
if (!client.enabled) continue; if (!client.enabled) continue;

Loading…
Cancel
Save