This commit is contained in:
mzs114 2024-09-19 16:19:16 +03:00 committed by GitHub
commit 6f41965bee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

View file

@ -7,6 +7,9 @@ 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

View file

@ -22,5 +22,8 @@ iptables -A $CHAIN_NAME -o lo -j ACCEPT
# Drop everything else coming through the Wireguard interface
iptables -A $CHAIN_NAME -i $WIREGUARD_INTERFACE -j DROP
# Drop traffic between the peers
iptables -I FORWARD -i $WIREGUARD_INTERFACE -o $WIREGUARD_INTERFACE -j DROP
# Return to FORWARD chain
iptables -A $CHAIN_NAME -j RETURN