Last active
January 31, 2022 14:05
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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