Networking on my Windows PC has the following configuration:
Ethernet adapter Ethernet 2:
Description . . . . . . . . . . . : Cisco AnyConnect Secure Mobility Client Virtual Miniport Adapter for Windows x64
...
IPv4 Address. . . . . . . . . . . : 172.27.31.15(Preferred)
Default Gateway . . . . . . . . . : ::
172.27.0.1
...
Ethernet adapter vEthernet (Default Switch):
...
IPv4 Address. . . . . . . . . . . : 172.22.128.1(Preferred)
...
Ethernet adapter vEthernet (WSL):
...
IPv4 Address. . . . . . . . . . . : 172.28.48.1(Preferred)
...
Wireless LAN adapter Wi-Fi:
...
IPv4 Address. . . . . . . . . . . : 192.168.2.13(Preferred)
Default Gateway . . . . . . . . . : 192.168.2.1
...
My WSL:
# ip addr|grep 'inet '
inet 127.0.0.1/8 scope host lo
inet 172.28.50.28/20 brd 172.28.63.255 scope global eth0
# ip route
default via 172.28.48.1 dev eth0
172.28.48.0/20 dev eth0 proto kernel scope link src 172.28.50.28
When the Windows PC is connected to VPN, pinging the IPs from within WSL2 give the following result:
172.27.0.1 (Unreachable)
192.168.2.1 (Unreachable)
172.28.48.1 (Unreachable)
172.22.128.1 (Unreachable)
When the Windows PC is disconnected from VPN, pinging the IPs from within WSL2 give the following result:
192.168.2.1 (YES)
172.28.48.1 (YES)
172.22.128.1 (Unreachable)
basically, when the Windows PC is connected to VPN, WSL2 is totally isolated from any IPs other than itself. How to fix this?
Update:
the routing situation shown by "rounte print" on Windows PC is as follows (I ommitted majority of lines with Gateway=192.168.2.1, Interface=192.168.2.13):
IPv4 Route Table
=================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.2.1 192.168.2.13 35
0.0.0.0 0.0.0.0 172.27.0.1 172.27.31.15 2
127.0.0.0 255.0.0.0 On-link 127.0.0.1 331
127.0.0.1 255.255.255.255 On-link 127.0.0.1 331
127.255.255.255 255.255.255.255 On-link 127.0.0.1 331
172.22.128.0 255.255.240.0 172.27.0.1 172.27.31.15 2
172.22.128.0 255.255.240.0 On-link 172.22.128.1 271
172.22.128.1 255.255.255.255 On-link 172.22.128.1 271
172.22.143.255 255.255.255.255 On-link 172.22.128.1 271
172.27.0.0 255.255.192.0 On-link 172.27.31.15 257
172.27.31.15 255.255.255.255 On-link 172.27.31.15 257
172.27.63.255 255.255.255.255 On-link 172.27.31.15 257
172.28.48.0 255.255.240.0 On-link 172.28.48.1 271
172.28.48.0 255.255.240.0 172.27.0.1 172.27.31.15 2
172.28.48.1 255.255.255.255 On-link 172.28.48.1 271
172.28.63.255 255.255.255.255 On-link 172.28.48.1 271
192.168.2.0 255.255.255.0 172.27.0.1 172.27.31.15 2
224.0.0.0 240.0.0.0 On-link 127.0.0.1 331
224.0.0.0 240.0.0.0 On-link 192.168.2.13 291
224.0.0.0 240.0.0.0 On-link 172.28.48.1 271
224.0.0.0 240.0.0.0 On-link 172.27.31.15 257
224.0.0.0 240.0.0.0 On-link 172.22.128.1 271
255.255.255.255 255.255.255.255 On-link 127.0.0.1 331
255.255.255.255 255.255.255.255 On-link 192.168.2.13 291
255.255.255.255 255.255.255.255 On-link 172.28.48.1 271
255.255.255.255 255.255.255.255 On-link 172.27.31.15 257
255.255.255.255 255.255.255.255 On-link 172.22.128.1 271
route print
on the Windows host with the VPN active to see what the routing situation looks like while the VPN is active.