forked from mirrors/amnezia-wg-easy
add WG_POST_UP, WG_POST_DOWN
This commit is contained in:
parent
e1582ec678
commit
a97142bb97
2 changed files with 21 additions and 7 deletions
|
@ -15,3 +15,12 @@ module.exports.WG_DEFAULT_DNS = typeof process.env.WG_DEFAULT_DNS === 'string'
|
|||
? process.env.WG_DEFAULT_DNS
|
||||
: '1.1.1.1';
|
||||
module.exports.WG_ALLOWED_IPS = process.env.WG_ALLOWED_IPS || '0.0.0.0/0, ::/0';
|
||||
|
||||
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 FORWARD -i wg0 -j ACCEPT;
|
||||
iptables -A FORWARD -o wg0 -j ACCEPT;
|
||||
`.split('\n').join(' ');
|
||||
|
||||
module.exports.WG_POST_DOWN = process.env.WG_POST_DOWN || '';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue