4

I have this issue with WSL2.0. Everytime I connect to my Citrix Secure Access VPN, my Ubuntu WSL2.0 loses internet connectivity. I cannot ping www.afr.com.au and I cannot ping 8.8.8.8.

When I run ping www.afr.com.au, it results in:

ping: www.afr.com.au: Temporary failure in name resolution

I do get an IP address of 172.31.176.8. My cat /etc/resolv.conf is as below:

nameserver 8.8.8.8
nameserver 192.168.152.221
nameserver 192.168.152.231
nameserver 172.19.96.1
search companya.com.au.local

My vEthernet(WSL) is 172.31.176.1.

When i tried to traceroute www.yahoo.com, it returns:

www.yahoo.com: Temporary failure in name resolution Cannot handle "host" cmdline arg 'www.yahoo.com' on position 1 (argc 1)

My /etc/wsl.conf is:

[network]
generateResolvConf = false

In my windows 10 cmd, when I try to run nslookup (whilst connected to VPN) it returns: nslookup

I also already tried to turn off firewall in Windows Defender firewall settings, only for vEthernet WSL: Windows Defender

Below is the result of Get-NetIPInterface: Get-NetIPInterface

1
  • Unfortunately I am facing the same issue: when using Citrix Secure Access and WSL2 combined, I lose DNS resolution in the WSL2. I will follow this.
    – lsambo
    Commented Apr 3 at 12:20

1 Answer 1

0

I was able to make it work using wsl-vpnkit v0.2.5 as recommended here.

Basically, I removed all configurations from my %userprofile%\.wslconfig that were related to networking and, in my distro, I set the following in the /etc/wsl.conf:

[network]
generateResolvConf = true

Finally, I've created a wsl-vpn-startup.bat file that I placed in my Start menu's startup directory with the following line:

wsl.exe -d wsl-vpnkit service wsl-vpnkit start

This way, wsl-vpnkit is started at login.

This configuration allowed me to perform a nslookup, a ping of the IP and curl of www.example.com and also use X11 apps using the Windows X11 server.

NOTE: I am using Windows 11 22H2 that was installed through an upgrade of Windows 10. However, one of my work colleagues has a system where Windows 11 was installed from scratch and he didn't need wsl-vpnkit. He simply modified his %userprofile%\.wslconfig to set networkingMode to mirrored and was able to access the network even with the Citrix Secure Access VPN enabled.

1
  • You likely simply need to update the WSL kernel. A workaround might be to upgrade to Windows 11 23H2, and see if the issue, is an outdated WSL kernel.
    – Ramhound
    Commented Apr 12 at 0:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .