Browse Source

config.js: fixup hardcoded eth0

pull/1108/head
Philip H 2 years ago
committed by GitHub
parent
commit
2e36eab3f8
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      src/config.js

2
src/config.js

@ -33,7 +33,7 @@ module.exports.WG_PRE_UP = process.env.WG_PRE_UP || '';
module.exports.WG_POST_UP = process.env.WG_POST_UP; module.exports.WG_POST_UP = process.env.WG_POST_UP;
if (!process.env.WG_POST_UP) { if (!process.env.WG_POST_UP) {
module.exports.WG_POST_UP = ` module.exports.WG_POST_UP = `
iptables -t nat -A POSTROUTING -s ${module.exports.WG_DEFAULT_ADDRESS.replace('x', '0')}/24 -o eth0 -j MASQUERADE; iptables -t nat -A POSTROUTING -s ${module.exports.WG_DEFAULT_ADDRESS.replace('x', '0')}/24 -o ${module.exports.WG_DEVICE} -j MASQUERADE;
iptables -A INPUT -p udp -m udp --dport 51820 -j ACCEPT; iptables -A INPUT -p udp -m udp --dport 51820 -j ACCEPT;
iptables -A FORWARD -i wg0 -j ACCEPT; iptables -A FORWARD -i wg0 -j ACCEPT;
iptables -A FORWARD -o wg0 -j ACCEPT;`; iptables -A FORWARD -o wg0 -j ACCEPT;`;

Loading…
Cancel
Save