Skip to content

Commit

Permalink
Update postdown.sh
Browse files Browse the repository at this point in the history
Added a corresponding rule to clean up the peer drop traffic rule in the postdown script.
  • Loading branch information
mzs114 authored Sep 4, 2024
1 parent 32a6678 commit fa5b28e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/iptable-rules/postdown.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ CHAIN_NAME="WIREGUARD_$WIREGUARD_INTERFACE"

iptables -t nat -D POSTROUTING -o $MASQUERADE_INTERFACE -j MASQUERADE -s $WIREGUARD_LAN

# Remove the drop rules between the peers
iptables -D FORWARD -i $WIREGUARD_INTERFACE -o $WIREGUARD_INTERFACE -j DROP

# Remove and delete the WIREGUARD_wg0 chain
iptables -D FORWARD -j $CHAIN_NAME
iptables -F $CHAIN_NAME
iptables -X $CHAIN_NAME
iptables -X $CHAIN_NAME

0 comments on commit fa5b28e

Please sign in to comment.