mirror of
https://github.com/Kiritow/wg-ops.git
synced 2024-03-22 13:11:37 +08:00
fix iptables rule
This commit is contained in:
parent
ea89859850
commit
811e81f126
|
@ -48,7 +48,8 @@ for line in content:
|
|||
elif line.startswith('#enable-forward'):
|
||||
results.append('PostUp=sysctl net.ipv4.ip_forward=1')
|
||||
elif line.startswith('#iptables-forward'):
|
||||
results.append('PostUp=iptables -A FORWARD -i {} -j ACCEPT')
|
||||
results.append('PostUp=iptables -A FORWARD -i {} -j ACCEPT'.format(wg_name))
|
||||
gen_ctx['post_down'].append('PostDown=iptables -D FORWARD -i {} -j ACCEPT'.format(wg_name))
|
||||
elif line.startswith('#udp2raw-server'):
|
||||
parts = line.split(' ')[1:]
|
||||
tunnel_name = parts[0]
|
||||
|
|
Loading…
Reference in New Issue
Block a user