Skip to content

Commit

Permalink
cleanup iptables rules for DNS_IP (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
sakai135 authored Apr 9, 2022
1 parent b9291ee commit 124ec82
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions wsl-vpnkit
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ cleanup () {
iptables -t nat -S | grep $VPNKIT_GATEWAY_IP | cut -d " " -f 2- | tr '\n' '\0' | xargs -0 -r -n 1 sh -c 'iptables -t nat -D $1' argv0
iptables -t nat -S | grep $VPNKIT_HOST_IP | cut -d " " -f 2- | tr '\n' '\0' | xargs -0 -r -n 1 sh -c 'iptables -t nat -D $1' argv0
iptables -t nat -S | grep $TAP_NAME | cut -d " " -f 2- | tr '\n' '\0' | xargs -0 -r -n 1 sh -c 'iptables -t nat -D $1' argv0
iptables -t nat -S | grep $DNS_IP | cut -d " " -f 2- | tr '\n' '\0' | xargs -0 -r -n 1 sh -c 'iptables -t nat -D $1' argv0
echo "iptables cleanup done"

echo "restoring WSL 2 ip route..."
Expand Down

0 comments on commit 124ec82

Please sign in to comment.