2020-06-09

Network Problems with WPAD and VirtualBox

After installing Oracle VirtualBox I encountered some network issues. On my Laptop from work we have Internet Explorer configured to auto detect the network settings (we use the wpad.dat with FindProxyForURL in it etc.) but suddenly the function stopped working for me and I had to set our proxy manually.

Trying out some stuff, I was finally able to connect normally after deleting the "VirtualBox Host-Only Network" Adapter. Strange, but fine...but thats not the solution, sometimes I want to use VirtualBox with isolated Network, so what now?
I was able to fix the whole situation by changing the metric of the adapters manually, Windows 10 uses automatic metric and this results into my problems.

I changed the metric to this order:
VPN Adapter metric 1
Ehternet LAN Adapter with Dock metric 2
Ehternet LAN Adapter directly on Laptop metric 3
WiFi Adapter metric 4
VirtualBox Host-Only Network Adapter  metric 5
you might set it to your desire as needed, just set VirtualBox metric to the least priority (highest metric)



How to change network adapter priorities using Control Panel

If you want to change the order in which Windows 10 uses network adapters, do the following:

  1. Open Settings.
  2. Click on Network & Internet.
  3. Click on Status.
  4. Click the Change Adapter options item.


  1. Right-click the network adapter you want to prioritize, and select Properties.


  1. Select the Internet Protocol Version 4 (TCP/IPv4) item.
  2. Click the Properties button.

  1. In the "General" tab, click the Advanced button.

  1. Clear the Automatic metric option.
  2. In the "Interface metric" field assign a priority value for the adapter.

Quick Tip: The lower the metric number means higher priority, and a higher number indicates lower priority.

  1. Click the OK button.
  2. Click the OK button again.
  3. Click the Close button.

Once you've completed the steps, Windows 10 will prioritize the network traffic depending on your configuration.

The only caveat using the Control Panel experience is that depending on your network setup, you may need to adjust the metric for the Internet Protocol Version 6 (TCP/IPv6) as well, if that's the protocol you're using. (Usually, you will be using the TCP/IPv4 protocol.)

At any time, you can revert the changes using the same instructions, but on step No. 9, make sure to check the Automatic metric option.

How to change network adapter priorities using PowerShell

Alternatively, you can change network adapters priorities on a device with multiple interfaces using PowerShell with these steps:

  1. Open Start.
  2. Search for Windows PowerShell, right-click the top result a select Run as administrator.
  3. Type the following command to identify the current interface metric and interface index number and press Enter:

Get-NetIPInterface

  1. Type the following command to change the priority order of the network adapter and press Enter:

Set-NetIPInterface -InterfaceIndex 21 -InterfaceMetric 10

In the command, make sure to change the -InterfaceIndex value to reflect the network adapter you want to prioritize and change the -InterfaceMetric value to assign a priority. Also, remember that a lower metric number means higher priority, and a higher metric number means lower priority.

  1. Type the following command to see the new metric applied to the network adapter and press Enter:

Get-NetIPInterface

After completing the steps, Windows 10 will prioritize the network traffic depending on your configuration when multiple network adapters are connected to the network.

At any time, you can go back to the previous behavior allowing Windows 10 to decide the network adapter priority using these steps:

  1. Open Start.
  2. Search for Windows PowerShell, right-click the top result a select Run as administrator.
  3. Type the following command to identify the current interface metric and interface index number and press Enter:

Set-NetIPInterface -InterfaceIndex 21 -AutomaticMetric enabled

In the command, make sure to change the -InterfaceIndex value with the correct number of the network adapter you want to apply an automatic metric.

 Guide Source

Keine Kommentare:

Kommentar veröffentlichen

Selfhost: RustDesk Server hinter Nginx Proxy Manager in Proxmox

 Wie man einen eigenen RustDesk Server im Homelab betreibt und ihn per URL erreichbar macht. Proxmox Container erstellen (ich nutze Debian 1...