h44z / wg-portal

WireGuard Configuration Portal with LDAP connection
https://wgportal.org/
MIT License
880 stars 121 forks source link

Squashed PostUp / PostDown #268

Closed gudata closed 1 day ago

gudata commented 1 month ago

Hello, I have saw that multiline postup/down are squashed.

-PostUp = iptables -w -I INPUT 1 -i %i -j ACCEPT
-PostUp = iptables -w -I INPUT 1 -i enp3s0 -p udp --dport 51820 -j ACCEPT
-PostUp = iptables -w -A FORWARD -i %i -m state --state RELATED,ESTABLISHED -j ACCEPT
-PostUp = iptables -w -A FORWARD -o %i -j ACCEPT
-PostUp = iptables -w -t nat -I POSTROUTING 1 -s 10.231.0.0/16 -o enp3s0 -j MASQUERADE
-PostDown = iptables -w -D INPUT -i %i -j ACCEPT
-PostDown = iptables -w -D INPUT -i enp3s0 -p udp --dport 51820 -j ACCEPT
-PostDown = iptables -w -D FORWARD -i %i -m state --state RELATED,ESTABLISHED -j ACCEPT
-PostDown = iptables -w -D FORWARD -o %i -j ACCEPT
-PostDown = iptables -w -t nat -D POSTROUTING -s 10.231.0.0/16 -o enp3s0 -j MASQUERADE

is converted to

+PostUp = iptables -w -I INPUT 1 -i %i -j ACCEPT; iptables -w -I INPUT 1 -i enp3s0 -p udp --dport 51820 -j ACCEPT; iptables -w -A FORWARD -i %i -m state --state RELATED,ESTABLISHED -j ACCEPT; iptables -w -A FORWARD -o %i -j ACCEPT; iptables -w -t nat -I POSTROUTING 1 -s 10.231.0.0/16 -o enp3s0 -j MASQUERADECEPT; iptables -w -A FORWARD -o %i -j ACCEPT; iptables -w -t nat -I POSTROUTING 1 -s 10.231.0.1/16 -o enp3s0 -j MASQUERADE
+PostDown = iptables -w -D INPUT -i %i -j ACCEPT; iptables -w -D INPUT -i enp3s0 -p udp --dport 51820 -j ACCEPT; iptables -w -D FORWARD -i %i -m state --state RELATED,ESTABLISHED -j ACCEPT; iptables -w -D FORWARD -o %i -j ACCEPT; iptables -w -t nat -D POSTROUTING -s 10.231.0.0/16 -o enp3s0 -j MASQUERADE
h44z commented 1 day ago

and what is the problem?