Skip to content

wsl 2 ubuntu 18.04 unable to connect to IP resources with Cisco Annyconnect active #4277

Closed

Description

@eclay11

Please fill out the below information:

  • Your Windows build number: (Type ver at a Windows Command Prompt)
    Microsoft Windows [Version 10.0.18932.1000]

  • What you're doing and what's happening: (Copy&paste the full set of specific command-line steps necessary to reproduce the behavior, and their output. Include screen shots if that helps demonstrate the problem.)
    I've installed ubuntu 18.04 and converted it to wsl v2 using the following command in windows powershell running as administrator.
    PS C:\WINDOWS\system32> wsl --set-version Ubuntu-18.04 2

When I start the Ubuntuu 18.04 instance I'm able to communicate with resources using IPs and hostnames.

eclay@wh-lpt-eclay:$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=49 time=115 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=49 time=95.4 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=49 time=77.3 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=49 time=92.6 ms
64 bytes from 8.8.8.8: icmp_seq=5 ttl=49 time=90.6 ms
64 bytes from 8.8.8.8: icmp_seq=6 ttl=49 time=78.9 ms
64 bytes from 8.8.8.8: icmp_seq=7 ttl=49 time=84.1 ms
64 bytes from 8.8.8.8: icmp_seq=8 ttl=49 time=90.9 ms
64 bytes from 8.8.8.8: icmp_seq=9 ttl=49 time=80.7 ms
64 bytes from 8.8.8.8: icmp_seq=10 ttl=49 time=80.0 ms
^C
--- 8.8.8.8 ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 9081ms
rtt min/avg/max/mdev = 77.316/88.602/115.084/10.734 ms
eclay@wh-lpt-eclay:~$ trace
tracepath traceroute6 traceroute6.iputils tracerpt.exe
eclay@wh-lpt-eclay:$ tracepath 8.8.8.8
1?: [LOCALHOST] pmtu 1500
1: wh-lpt-eclay.mshome.net 0.497ms
1: wh-lpt-eclay.mshome.net 0.379ms
2: 10.179.10.1 2.890ms
3: 192.168.1.1 8.474ms
4: 192.168.1.1 10.395ms pmtu 1430
4: 172.26.96.161 71.223ms
5: 172.18.84.36 73.898ms asymm 6
6: 12.249.2.25 73.083ms asymm 7
7: 12.122.146.97 96.016ms asymm 14
8: 12.122.111.33 95.857ms asymm 13
9: sffca22crs.ip.att.net 95.209ms asymm 12
10: 12.122.163.61 90.288ms asymm 11
11: 12.255.10.236 103.555ms asymm 15
12: no reply
13: no reply
14: no reply
15: no reply
16: no reply
17: no reply
18: no reply
19: no reply
20: no reply
21: no reply
22: no reply
23: no reply
24: no reply
25: no reply
26: no reply
27: no reply
28: no reply
29: no reply
30: no reply
Too many hops: pmtu 1430 Resume: pmtu 1430

Once I connect to my work VPN using cisco annyconnect client v 4.7.00136 I'm not longer able to connect to IP resources.

eclay@wh-lpt-eclay:$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
^C
--- 8.8.8.8 ping statistics ---
8 packets transmitted, 0 received, 100% packet loss, time 7277ms

eclay@wh-lpt-eclay:$ tracepath 8.8.8.8
1?: [LOCALHOST] pmtu 1430
1: ??? 0.362ms
1: ??? 0.364ms
2: ??? 0.392ms pmtu 1200
2: no reply
3: no reply
4: no reply
5: no reply
6: no reply
7: no reply
8: no reply
9: no reply
10: no reply
11: no reply
12: no reply
13: no reply
14: no reply
15: no reply
16: no reply
17: no reply
18: no reply
19: no reply
20: no reply
21: no reply
22: no reply
23: no reply
24: no reply
25: no reply
26: no reply
27: no reply
28: no reply
29: no reply
30: no reply
Too many hops: pmtu 1200
Resume: pmtu 1200

  • What's wrong / what should be happening instead:
    I should be able to ping 8.8.8.8 or other outside IPs once the annyconnect vpn client is running.

Activity

  1. eclay11 commented on Jul 7, 2019

    @eclay11
    Author

    I've tried the method of creating a manual named.conf and it didn't fix anything. I can ping the 1st dns server from windows but not from ubuntu.
    Windows DNS servers after vpn connection established.

    DNS Servers . . . . . . . . . . . : 172.24.0.25
    8.8.8.8
    C:\Users\eclay>ping 172.24.0.25

    Pinging 172.24.0.25 with 32 bytes of data:
    Reply from 172.24.0.25: bytes=32 time=131ms TTL=126
    Reply from 172.24.0.25: bytes=32 time=103ms TTL=126
    Reply from 172.24.0.25: bytes=32 time=109ms TTL=126

    Ubuntu

    $ ping 172.24.0.25
    PING 172.24.0.25 (172.24.0.25) 56(84) bytes of data.

    ^C
    --- 172.24.0.25 ping statistics ---
    190 packets transmitted, 0 received, 100% packet loss, time 196530ms

    It seems to be more of a routing problem than a name resolution. For instance I can ping www.microsoft.com from a cmd prompt but not from ubunutu.

    windows

    ping www.microsoft.com

    Pinging e13678.dspb.akamaiedge.net [23.202.232.226] with 32 bytes of data:
    Reply from 23.202.232.226: bytes=32 time=103ms TTL=51
    Reply from 23.202.232.226: bytes=32 time=105ms TTL=51
    Reply from 23.202.232.226: bytes=32 time=121ms TTL=51
    Reply from 23.202.232.226: bytes=32 time=109ms TTL=51

    Ping statistics for 23.202.232.226:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
    Minimum = 103ms, Maximum = 121ms, Average = 109ms

    Ubuntu

    $ ping 23.202.232.226
    PING 23.202.232.226 (23.202.232.226) 56(84) bytes of data.
    ^C
    --- 23.202.232.226 ping statistics ---
    5 packets transmitted, 0 received, 100% packet loss, time 4176ms

  2. WsK commented on Aug 16, 2019

    @WsK

    Having exactly same problem...Errrrr

  3. kobenauf commented on Aug 16, 2019

    @kobenauf

    I have the same issue, that from within the WSL 2 shell, I'm unable to use AnyConnect running in Windows. However, in WSL I installed openconnect, and I run:
    sudo openconnect --no-dtls -u myUsername vpn.myhost.com
    Then I can access my company ip addresses from within WSL 2 sessions, but not from Windows, but this lets me at least ssh and run git, so that's an improvement.

    Also, this only works if I disconnect the VPN in Windows first, which is annoying.

  4. chunkaichang commented on Aug 23, 2019

    @chunkaichang

    Same issue here. I tried to add search list in /etc/resolv.conf followed the guide here but still failed.

  5. craigloewen-msft commented on Sep 4, 2019

    @craigloewen-msft
    Member

    If you're still experiencing this issue could you please take some networking logs? It will help us diagnose what's going on.

    You can find instructions on how to do so here!

  6. mcurole commented on Sep 5, 2019

    @mcurole

    I'm definitely experiencing this issue and I'm running 18970. I can capture logs if needed. The problem is easy to reproduce.

  7. mcurole commented on Sep 5, 2019

    @mcurole

    Well, cancel that. I don't have the Feedback Hub installed and I have another issue where I can't download app from the Microsoft Store because of some weird Microsoft Account issue that I'm working with support on.

  8. MichaelTong commented on Sep 8, 2019

    @MichaelTong

    Also, if WSL 2 starts first, Cisco AnyConnect will fail to connect.

  9. MichaelTong commented on Sep 8, 2019

    @MichaelTong

    I filed a feedback in FH. https://aka.ms/AA60j0u

  10. cmeiklejohn commented on Oct 12, 2019

    @cmeiklejohn

    Same issue, I filed feedback using Feedback Hub.

  11. paulguerrero commented on Oct 14, 2019

    @paulguerrero

    I also have the same issue with AnyConnect, also gave feedback in the Hub (although the option to post a recording was grayed out for me).

  12. neileadobe commented on Oct 31, 2019

    @neileadobe

    I'm also having this problem and opened an issue for it in Feedback Hub with logs: https://aka.ms/AA6fthe

  13. 228 remaining items

  14. dalgibbard commented on Aug 27, 2024

    @dalgibbard

    Panu Aho (@donkkis) as a Cisco Anyconnect user with enforced full-tunnel connection, I can confirm that mirrored networking does work as you would hope.
    I have been using it since the feature was first released.

  15. timoooo commented on Sep 5, 2024

    @timoooo

    Darren Gibbard (@dalgibbard) So no further workaround are needed? Can you tell me what AnyConnect version you are using?

    With AnyConnect we can resolve our internal IPs and connect them, but anything that goes outside (e.g. archive.ubuntu.com fails) fails to connect to. According to our IT Department its because the Proxy authentication fails.

  16. balmeida-nokia commented on Sep 5, 2024

    @balmeida-nokia

    Timo (@timoooo) With the new versions of AnyConnect,
    To deal with proxies, set the HTTP_PROXY collection of environment variables so everything connects using your company's proxy

  17. timoooo commented on Sep 5, 2024

    @timoooo

    I set the values HTTP_PROXY, HTTPS_PROXY, http_proxy and https_proxy to my Proxy address but the issues persist

  18. balmeida-nokia commented on Sep 5, 2024

    @balmeida-nokia

    Are you passing them to apt when you run sudo (sudo clears most env vars by default)?

  19. timoooo commented on Sep 5, 2024

    @timoooo

    balmeida-nokia no i just run sudo apt ... straight after setting the env variables

  20. timoooo commented on Sep 5, 2024

    @timoooo

    balmeida-nokia thanks that worked for the Ubuntu repos however i appaerently need to authenticate to get to Err:1 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy InRelease
    Invalid response from proxy: HTTP/1.1 407 authenticationrequired Date: Thu, 05 Sep 2024 13:10:31 GMT Content-Type: text/html Cache-Control: no-cache Content-Length: 4734 X-Frame-Options: deny Proxy-Connection: Keep-Alive Proxy-Authenticate: Negotiate any ideas how i could authenticate to the proxy via wsl?

  21. balmeida-nokia commented on Sep 5, 2024

    @balmeida-nokia

    Did you try searching for HTTP_PROXY authentication?

  22. madscientist42 commented on Oct 30, 2024

    @madscientist42

    This is still busted out of the box. C'mon, Microsoft...I don't care if it's FOSS, it's a PRODUCT you offer- fix this properly.

    I shouldn't have to use Admin Mode Powershell scripting hacks to "fix" this. Even though it's slower, VirtualBox manages to actually WORK in NAT mode and YOU DO NOT here.

    Five years, guys. This isn't acceptable.

  23. coltenkrauter commented on May 9, 2025

    @coltenkrauter

    WSL 2.2.1+ introduced dnsTunneling=true in .wslconfig, which is now enabled by default.
    Docs: https://learn.microsoft.com/en-us/windows/wsl/troubleshooting#networking-considerations-with-dns-tunneling
    Release: https://github.com/microsoft/WSL/releases/tag/2.2.1

    This resolved DNS issues for many users with VPNs like Cisco AnyConnect.
    Reference: https://gist.github.com/coltenkrauter/608cfe02319ce60facd76373249b8ca6

    Curious if this addresses the connectivity issues reported in this thread.

  24. ALERTua commented on May 12, 2025

    @ALERTua

    WSL 2.2.1+ introduced dnsTunneling=true in .wslconfig, which is now enabled by default. Docs: https://learn.microsoft.com/en-us/windows/wsl/troubleshooting#networking-considerations-with-dns-tunneling Release: https://github.com/microsoft/WSL/releases/tag/2.2.1

    This resolved DNS issues for many users with VPNs like Cisco AnyConnect. Reference: https://gist.github.com/coltenkrauter/608cfe02319ce60facd76373249b8ca6

    Curious if this addresses the connectivity issues reported in this thread.

    No, it does not resolve the connectivity issues. We've been banging our heads for a few days now at work. None of the settings' combinations work.

  25. chuanqisun commented on May 20, 2025

    @chuanqisun

    I came across a related issue: when using a different VPN: Global Secure Access Client (made by Microsoft 🤷), pinging graph.microsoft.com and cdn.graph.office.net from WSL would result in indefinite hanging. I tried dnsTunneling and mirrored networking without success. Disabling the VPN does the trick but a solution is still needed.

  26. tnabil commented on Jun 23, 2025

    @tnabil

    I tried to read as much of this as possible, so hopefully, my question hasn't been answered before. I had to upgrade to our organisation's latest Windows 11 SOE and I was hoping things would be better but they're not.
    The solution I had been using on Windows 10 is the script that sets the interface metric to a high value (6000). After unsuccessfully trying everything in this thread, especially mirrored mode, I'm back to the same solution.
    My problem is, this solution is extremely inconvenient, because even though it allows me to access the VPN from WSL2, it affects my non-WSL traffic. Once I run the script, websites that I access outside WSL2 and are only accessible through the VPN, don't work! My VPN is split-tunnel, so that must have something to do with that. Has anyone found a solution for this?
    To summarise:

    • Split-tunnel VPN (Cisco)
    • Setting interface metric allows me to access internal as well as external network resources from WSL
    • It makes non-WSL traffic appear not to be going through the VPN
  27. microsoft-github-policy-service commented on Jun 25, 2026

    @microsoft-github-policy-service
    Contributor

    This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.

    Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    networkwsl2Issue/feature applies to WSL 2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions