Browse Source

Update config.js

Fix WG_PORT var missed in iptables
pull/498/head
TEMAndroid 3 years ago
committed by GitHub
parent
commit
dc1d4a610e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/config.js

2
src/config.js

@ -19,7 +19,7 @@ module.exports.WG_ALLOWED_IPS = process.env.WG_ALLOWED_IPS || '0.0.0.0/0, ::/0';
module.exports.WG_PRE_UP = process.env.WG_PRE_UP || '';
module.exports.WG_POST_UP = process.env.WG_POST_UP || `
iptables -t nat -A POSTROUTING -s ${module.exports.WG_DEFAULT_ADDRESS.replace('x', '0')}/24 -o eth0 -j MASQUERADE;
iptables -A INPUT -p udp -m udp --dport 51820 -j ACCEPT;
iptables -A INPUT -p udp -m udp --dport ${module.exports.WG_PORT} -j ACCEPT;
iptables -A FORWARD -i wg0 -j ACCEPT;
iptables -A FORWARD -o wg0 -j ACCEPT;
`.split('\n').join(' ');

Loading…
Cancel
Save