WSL : VPN problem (with workaround)
if you’re a developer that loves linux and unfortunately you got a windows laptop from your employer. there’s a good chance that you’re using WSL (windows subsystem for linux).
With WSL, you get a linux in your windows, so you start by configuring your bash_profile, working on your shortcuts, alias, and then you want to git clone your project from the versioning system of your company (e.g:: github, bitbucket…etc) but then OH, after a while, you get an error message that says: ‘Temporary failure in name resolution’.
you will probably get to this page after a few search online: https://learn.microsoft.com/en-us/windows/wsl/troubleshooting#wsl-has-no-network-connectivity-once-connected-to-a-vpn
you should definitely follow the steps described in there (disabling the auto generate resolv.conf by turning it off with wsl.conf under /etc/), then here’s what I do every time I connect to my work VPN:
1- first, make sure that you are not connected to your VPN
2- disable your wsl interface:
netsh interface set interface "vEthernet (WSL)" disable
of course, don’t forget to verify your interface name before
2- connect to your VPN
3- enable your wsl interface
netsh interface set interface "vEthernet (WSL)" enable
and voila!
now, your linux (ubuntu) should be able to ping any dns.
clap if you liked or if it helped!
see ya folks!!!