Open kid1412621 opened 1 year ago
It all depends on your setup. I am guessing that your VPN client creates a network interface that's named differently.
It all depends on your setup. I am guessing that your VPN client creates a network interface that's named differently.
Yes, it's different. And I changed it accordingly. However still not working.
Copy/Paste the stack trace.
Hi @kid1412621,
If you can please share the following details, then we may be able to assist you:
Get-NetAdapter
in PowerShellGet-NetRoute
in PowerShellHi @kid1412621,
If you can please share the following details, then we may be able to assist you:
- The output from the script
- The output of running
Get-NetAdapter
in PowerShell- The output of running
Get-NetRoute
in PowerShell
[DEBUG] WSL2 Guest IP Addresses: Previous (Revised) =
[DEBUG] WSL2 Guest IP Addresses: Current = 172.22.5.219
Creating routes ...
Creating route for 172.22.5.219
[DEBUG] Command: route add 172.22.5.219 mask 255.255.255.255 172.22.5.219 metric 1 if 47
The requested operation requires elevation.
Performing cleanup ...
Done
Get-NetAdapter
:
Name InterfaceDescription ifIndex Status MacAddress LinkSpeed
---- -------------------- ------- ------ ---------- ---------
vEthernet (Default Switc… Hyper-V Virtual Ethernet Adapter 24 Up 00-15-5D-51-1A-F5 10 Gbps
GlobalProtect VPN PANGP Virtual Ethernet Adapter 23 Disabled 02-50-41-00-00-01 2 Gbps
VirtualBox Host-Only Net… VirtualBox Host-Only Ethernet Adapter 19 Up 0A-00-27-00-00-13 1 Gbps
Ethernet 2 Cisco AnyConnect Secure Mobility Client Virtual Miniport Adapter for Windows x64 17 Up 00-05-9A-3C-7A-00 172.4 Mbps
vEthernet (WSL) Hyper-V Virtual Ethernet Adapter #2 47 Up 00-15-5D-AB-6A-A0 10 Gbps
Wi-Fi Intel(R) Wi-Fi 6 AX201 160MHz 13 Up 08-6A-C5-24-65-9E 173.3 Mbps
Bluetooth Network Connec… Bluetooth Device (Personal Area Networ… 11 Not Present 08-6A-C5-24-65-A2 0 bps
Ethernet Intel(R) Ethernet Connection (13) I219… 10 Disconnected 38-14-28-70-F7-58 0 bps
Get-NetRoute
:
ifIndex DestinationPrefix NextHop RouteMetric ifMetric PolicyStore
------- ----------------- ------- ----------- -------- -----------
47 255.255.255.255/32 0.0.0.0 256 15 ActiveStore
24 255.255.255.255/32 0.0.0.0 256 15 ActiveStore
17 255.255.255.255/32 0.0.0.0 256 1 ActiveStore
14 255.255.255.255/32 0.0.0.0 256 25 ActiveStore
20 255.255.255.255/32 0.0.0.0 256 25 ActiveStore
13 255.255.255.255/32 0.0.0.0 256 45 ActiveStore
19 255.255.255.255/32 0.0.0.0 256 25 ActiveStore
10 255.255.255.255/32 0.0.0.0 256 5 ActiveStore
1 255.255.255.255/32 0.0.0.0 256 75 ActiveStore
47 224.0.0.0/4 0.0.0.0 256 15 ActiveStore
24 224.0.0.0/4 0.0.0.0 256 15 ActiveStore
17 224.0.0.0/4 0.0.0.0 256 1 ActiveStore
14 224.0.0.0/4 0.0.0.0 256 25 ActiveStore
20 224.0.0.0/4 0.0.0.0 256 25 ActiveStore
13 224.0.0.0/4 0.0.0.0 256 45 ActiveStore
19 224.0.0.0/4 0.0.0.0 256 25 ActiveStore
10 224.0.0.0/4 0.0.0.0 256 5 ActiveStore
1 224.0.0.0/4 0.0.0.0 256 75 ActiveStore
13 218.203.244.34/32 172.16.126.254 1 45 ActiveStore
13 204.79.197.215/32 172.16.126.254 0 45 ActiveStore
13 191.234.140.0/22 172.16.126.254 0 45 ActiveStore
13 183.221.253.100/32 172.16.126.254 1 45 ActiveStore
24 172.25.15.255/32 0.0.0.0 256 15 ActiveStore
24 172.25.0.1/32 0.0.0.0 256 15 ActiveStore
24 172.25.0.0/20 0.0.0.0 256 15 ActiveStore
17 172.25.0.0/20 10.29.176.1 1 1 ActiveStore
47 172.22.15.255/32 0.0.0.0 256 15 ActiveStore
47 172.22.0.1/32 0.0.0.0 256 15 ActiveStore
47 172.22.0.0/20 0.0.0.0 256 15 ActiveStore
17 172.22.0.0/20 10.29.176.1 1 1 ActiveStore
13 172.16.126.255/32 0.0.0.0 256 45 ActiveStore
13 172.16.126.254/32 0.0.0.0 1 45 ActiveStore
13 172.16.126.38/32 0.0.0.0 256 45 ActiveStore
17 172.16.126.0/24 10.29.176.1 1 1 ActiveStore
13 172.16.126.0/24 0.0.0.0 256 45 ActiveStore
19 169.254.255.255/32 0.0.0.0 256 25 ActiveStore
19 169.254.177.146/32 0.0.0.0 256 25 ActiveStore
17 169.254.0.0/16 10.29.176.1 1 1 ActiveStore
19 169.254.0.0/16 0.0.0.0 256 25 ActiveStore
13 159.220.76.141/32 172.16.126.254 1 45 ActiveStore
13 150.171.40.0/22 172.16.126.254 0 45 ActiveStore
13 150.171.32.0/22 172.16.126.254 0 45 ActiveStore
13 132.245.0.0/16 172.16.126.254 0 45 ActiveStore
13 131.253.33.215/32 172.16.126.254 0 45 ActiveStore
1 127.255.255.255/32 0.0.0.0 256 75 ActiveStore
1 127.0.0.1/32 0.0.0.0 256 75 ActiveStore
1 127.0.0.0/8 0.0.0.0 256 75 ActiveStore
13 104.146.128.0/17 172.16.126.254 0 45 ActiveStore
13 52.120.0.0/14 172.16.126.254 0 45 ActiveStore
13 52.112.0.0/14 172.16.126.254 0 45 ActiveStore
13 52.104.0.0/14 172.16.126.254 0 45 ActiveStore
13 52.96.0.0/14 172.16.126.254 0 45 ActiveStore
13 40.108.128.0/17 172.16.126.254 0 45 ActiveStore
13 40.104.0.0/15 172.16.126.254 0 45 ActiveStore
13 40.96.0.0/13 172.16.126.254 0 45 ActiveStore
13 23.103.160.0/20 172.16.126.254 0 45 ActiveStore
13 13.110.33.22/31 172.16.126.254 0 45 ActiveStore
13 13.108.251.2/31 172.16.126.254 0 45 ActiveStore
13 13.108.248.130/31 172.16.126.254 0 45 ActiveStore
13 13.108.232.2/31 172.16.126.254 0 45 ActiveStore
13 13.107.136.0/22 172.16.126.254 0 45 ActiveStore
13 13.107.128.0/22 172.16.126.254 0 45 ActiveStore
13 13.107.64.0/18 172.16.126.254 0 45 ActiveStore
13 13.107.60.1/32 172.16.126.254 0 45 ActiveStore
13 13.107.18.10/31 172.16.126.254 0 45 ActiveStore
13 13.107.6.152/31 172.16.126.254 0 45 ActiveStore
17 10.29.191.255/32 0.0.0.0 256 1 ActiveStore
17 10.29.179.109/32 0.0.0.0 256 1 ActiveStore
17 10.29.176.0/20 0.0.0.0 256 1 ActiveStore
17 0.0.0.0/0 10.29.176.1 1 1 ActiveStore
13 0.0.0.0/0 172.16.126.254 0 45 ActiveStore
47 ff00::/8 :: 256 15 ActiveStore
24 ff00::/8 :: 256 15 ActiveStore
14 ff00::/8 :: 256 25 ActiveStore
20 ff00::/8 :: 256 25 ActiveStore
13 ff00::/8 :: 256 45 ActiveStore
19 ff00::/8 :: 256 25 ActiveStore
10 ff00::/8 :: 256 5 ActiveStore
1 ff00::/8 :: 256 75 ActiveStore
19 fe80::f5a4:8bb4:409f:e2f/128 :: 256 25 ActiveStore
47 fe80::f373:e4d0:894f:eeb1/128 :: 256 15 ActiveStore
14 fe80::d800:8332:d9a7:666b/128 :: 256 25 ActiveStore
10 fe80::d26e:1d66:3b30:5642/128 :: 256 5 ActiveStore
17 fe80::ceb8:3f06:5ca0:cdad/128 :: 256 35 ActiveStore
17 fe80::ceb8:3f06:5ca0:cdac/126 :: 256 35 ActiveStore
20 fe80::a055:1841:e27a:e1fc/128 :: 256 25 ActiveStore
24 fe80::5858:5626:54ca:64d8/128 :: 256 15 ActiveStore
17 fe80::1d55:108f:745d:1e90/128 :: 256 35 ActiveStore
13 fe80::6c1:3fc1:2ff8:3073/128 :: 256 45 ActiveStore
17 fe80::/64 :: 256 35 ActiveStore
14 fe80::/64 :: 256 25 ActiveStore
20 fe80::/64 :: 256 25 ActiveStore
10 fe80::/64 :: 256 5 ActiveStore
1 ::1/128 :: 256 75 ActiveStore
17 ::/0 :: 1 35 ActiveStore
one more thing to be sure, the DNS IP of host network on the VPN is this one?
@kid1412621
From the script output: The requested operation requires elevation.
The script MUST be run with admin privileges (from an admin powershell session)
Hi there, thanks for your script. It works fine with Global Protect VPN. However, when I switched to "Cisco AnyConnect Secure Mobility Client" for VPN connection, it didn't work. Any chance you know where might go wrong?