Skip to content

Instantly share code, notes, and snippets.

@lapo-luchini
Created June 19, 2020 22:07
Show Gist options
  • Save lapo-luchini/c1b6bf56c12e451a44c395d37b8dee21 to your computer and use it in GitHub Desktop.
Save lapo-luchini/c1b6bf56c12e451a44c395d37b8dee21 to your computer and use it in GitHub Desktop.
#!/bin/sh
# first you need to set the Hyper-V virtual switch named "WSL" to "external network" (bridge mode)
cat <<EOF > /etc/resolv.conf
nameserver 192.168.1.1
nameserver 8.8.8.8
nameserver 2001:4860:4860::8888
EOF
ip addr add 192.168.1.8/24 dev eth0
route add default gw 192.168.1.1
route del default gw 172.23.160.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment