mirror of
https://github.com/Kiritow/wg-ops.git
synced 2024-03-22 13:11:37 +08:00
Add MASQUERADE POSTROUTING chain support
This commit is contained in:
parent
e1afe5f8f3
commit
413af7c180
|
@ -599,6 +599,9 @@ class Parser:
|
|||
elif line.startswith('#iptables-forward'):
|
||||
self.result_postup.append('iptables -A FORWARD -i {} -j ACCEPT'.format(self.wg_name))
|
||||
self.result_postdown.append('iptables -D FORWARD -i {} -j ACCEPT'.format(self.wg_name))
|
||||
elif line.startswith('#iptables-gateway'):
|
||||
self.result_postup.append('iptables -t nat -A POSTROUTING -o {} -j MASQUERADE'.format(self.wg_name))
|
||||
self.result_postdown.append('iptables -t nat -D POSTROUTING -o {} -j MASQUERADE'.format(self.wg_name))
|
||||
elif line.startswith('#route-to'):
|
||||
self.flag_is_route_forward = True
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user