Skip to content

Instantly share code, notes, and snippets.

View ThiagoBarradas's full-sized avatar
👽
em marte!

Thiago Barradas ThiagoBarradas

👽
em marte!
View GitHub Profile
@ThiagoBarradas
ThiagoBarradas / wsl-vpn-fix.sh
Last active February 4, 2022 18:48 — forked from MatMercer/wsl-vpn-fix.sh
Fix WSL 2 DNS resolution when connected to Cisco AnyConnect VPN
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
TMP_DIR=`mktemp -d`
TMP_SCRIPT="$TMP_DIR/network-metrics.ps1"
TMP_RESOLV="$TMP_DIR/resolv.conf"