Skip to content

Instantly share code, notes, and snippets.

@nmelihsensoy
Last active January 31, 2022 14:05
Show Gist options
  • Select an option

  • Save nmelihsensoy/1a9f1610d87a77f2c685b09a64f6a1de to your computer and use it in GitHub Desktop.

Select an option

Save nmelihsensoy/1a9f1610d87a77f2c685b09a64f6a1de to your computer and use it in GitHub Desktop.
fix for no internet in wsl while host connected to wireguard vpn issue
From WSL(Ubuntu 20.04) :
sudo rm -f /etc/wsl.conf && echo "[network]\ngenerateResolvConf = false" >> /etc/wsl.conf
sudo rm -f /etc/resolv.conf && echo "nameserver 1.1.1.1" >> /etc/resolv.conf
sudo chattr +i /etc/resolv.conf
From Host(Windows 11) :
WireGuard [Peer] Config:
AllowedIPs = ::/128, 0.0.0.0/0
netsh interface ipv4 show subinterface
MTU MediaSenseState Bytes In Bytes Out Interface
---------- --------------- ------------ ------------ -------------
1280 1 102801403344 1383363816 cloudflare_wsl_fixed = wireguard tunnel name
From WSL(Ubuntu 20.04) :
sudo ip link set eth0 mtu 1280
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment