How to Set Interface Metric?
Posted: Tue Mar 27, 2018 11:19 am
Hello,
I have a Netgear Orbi router at home. I've configured the VPN successfully and set the access to Home Network only.
When I downloaded the smartphone profile, my iPhone can connect to home using the OpenVPN iOS client. I can access my home resources as expected on their 192.168.242.0/24 IP addresses. My internet bound traffic goes out the LTE or wifi network and works as expected. Everything is all set here.
On the Windows side of things, its not going well. The Viscosity client imports the Windows config from the Orbi and connects just fine. However, I cannot access any home resources on 192.168.242.0/24 and I lose connectivity to the Internet. I've determined that the metric for the Viscosity interface is being set to 1 and my wifi interface metric is much higher (typically 25 or 50). When I turn off automatic metric on the Viscosity interface and set it to a higher number than my wifi, things work as expected (meaning I can hit my home resources on those IPs and my general internet still works).
Here's a snippet of the routing table when I first connect and don't change metric manually:
===========================================================================
Interface List
16...00 ff a9 45 d0 85 ......Viscosity Virtual Adapter V9.1
18...84 8f 69 cb 93 d4 ......This Qualcomm Atheros network Controller connects you to the network.
7...02 00 4c 4f 4f 50 ......Npcap Loopback Adapter
11...88 53 2e a4 8b 80 ......Microsoft Hosted Network Virtual Adapter
15...88 53 2e a4 8b 7f ......Intel(R) Centrino(R) Advanced-N 6230
14...88 53 2e a4 8b 83 ......Bluetooth PAN HelpText
1...........................Software Loopback Interface 1
10...00 00 00 00 00 00 00 e0 Microsoft Teredo Tunneling Adapter
===========================================================================
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 172.20.10.1 172.20.10.5 50
0.0.0.0 0.0.0.0 192.168.242.1 192.168.242.120 1
I'm at home now so 172.20.10.5 represents my connection via tethering to my iPhone. The 192.168.242.120 connection is the VPN session. If I open up CMD and change metric to say 100 on the 192.168.242.120 route, everything works as I want it to. If I head into the Viscosity Adapter properties and turn off automatic metric and set to 100, everything works as I want it to.
I tried turning automatic metric off and manually setting the metric to 100 on the Viscosity network adapter but every subsequent connection to the VPN always resets it back to automatic metric which assigns 1 to the Viscosity adapter.
I've tried adding "route-metric 100" to the advanced options for the connection in Viscosity but this has no effect.
Is there a way to make the metric changes stick on the client side or tell Viscosity to set the metric to something arbitrary? The Orbi is, obviously, a closed platform so I don't think I can change any of the OpenVPN settings on the Orbi other than what's in the gui. I'd like to avoid writing manual scripts if possible for every Windows PC that I connect to the VPN or having to manually set the metric after every connection.
Previously, this worked on my old Netgear R8000, before it died, using the OpenVPN Community client. I'd like to stick with the Viscosity client since I also have a Mac that I'm going to try this out on once I get the windows side solved.
Any help is appreciated. Please let me know if I can provide any other information.
Thanks.
I have a Netgear Orbi router at home. I've configured the VPN successfully and set the access to Home Network only.
When I downloaded the smartphone profile, my iPhone can connect to home using the OpenVPN iOS client. I can access my home resources as expected on their 192.168.242.0/24 IP addresses. My internet bound traffic goes out the LTE or wifi network and works as expected. Everything is all set here.
On the Windows side of things, its not going well. The Viscosity client imports the Windows config from the Orbi and connects just fine. However, I cannot access any home resources on 192.168.242.0/24 and I lose connectivity to the Internet. I've determined that the metric for the Viscosity interface is being set to 1 and my wifi interface metric is much higher (typically 25 or 50). When I turn off automatic metric on the Viscosity interface and set it to a higher number than my wifi, things work as expected (meaning I can hit my home resources on those IPs and my general internet still works).
Here's a snippet of the routing table when I first connect and don't change metric manually:
===========================================================================
Interface List
16...00 ff a9 45 d0 85 ......Viscosity Virtual Adapter V9.1
18...84 8f 69 cb 93 d4 ......This Qualcomm Atheros network Controller connects you to the network.
7...02 00 4c 4f 4f 50 ......Npcap Loopback Adapter
11...88 53 2e a4 8b 80 ......Microsoft Hosted Network Virtual Adapter
15...88 53 2e a4 8b 7f ......Intel(R) Centrino(R) Advanced-N 6230
14...88 53 2e a4 8b 83 ......Bluetooth PAN HelpText
1...........................Software Loopback Interface 1
10...00 00 00 00 00 00 00 e0 Microsoft Teredo Tunneling Adapter
===========================================================================
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 172.20.10.1 172.20.10.5 50
0.0.0.0 0.0.0.0 192.168.242.1 192.168.242.120 1
I'm at home now so 172.20.10.5 represents my connection via tethering to my iPhone. The 192.168.242.120 connection is the VPN session. If I open up CMD and change metric to say 100 on the 192.168.242.120 route, everything works as I want it to. If I head into the Viscosity Adapter properties and turn off automatic metric and set to 100, everything works as I want it to.
I tried turning automatic metric off and manually setting the metric to 100 on the Viscosity network adapter but every subsequent connection to the VPN always resets it back to automatic metric which assigns 1 to the Viscosity adapter.
I've tried adding "route-metric 100" to the advanced options for the connection in Viscosity but this has no effect.
Is there a way to make the metric changes stick on the client side or tell Viscosity to set the metric to something arbitrary? The Orbi is, obviously, a closed platform so I don't think I can change any of the OpenVPN settings on the Orbi other than what's in the gui. I'd like to avoid writing manual scripts if possible for every Windows PC that I connect to the VPN or having to manually set the metric after every connection.
Previously, this worked on my old Netgear R8000, before it died, using the OpenVPN Community client. I'd like to stick with the Viscosity client since I also have a Mac that I'm going to try this out on once I get the windows side solved.
Any help is appreciated. Please let me know if I can provide any other information.
Thanks.