proxy script does not work when two networking cards are connected. How to fix this?
@Palmin I had the same problem, and thankfully stumbled upon a solution in this social.technet thread! The priority of adapter IPs that Windows returns to a browser's myIpAddress()
implementation can be modified by changing the IP metrics.
I manually set the metrics for my physical adapters to 1, 2, etc, and put the VirtualBox Host-Only Network at the end. It works like a charm now.
My specific configuration/journey for others struggling with the same issue:
- Windows 7 Enterprise
- VirtualBox 4.1.20 r80170
Accessing web pages on the Internet when on wireless always failed. When on a wired connection they worked just fine, and intranet pages were always accessible. Disabling the VirtualBox Host-Only Network adapter resolved the issue. Manually configuring my browser to always use a proxy (versus auto-detect) also resolved the issue.
To confirm the nature of the PAC problem, I used the pactester utility to test the behavior of wpad.dat
with my physical addresses versus the VirtualBox one. As expected, the proxy script returns direct connections for private IPv4 addresses. The default VirtualBox Host-Only IPv4 address is in the 192.168.x.x
range.
Modifying the adapter priority did not resolve the issue for me. It was not fully (and cleanly) resolved until I modified the metrics for each adapter.
I have a solution, eureka :)
I had to change the priority of the network interfaces. The interface (LAN) that will have access to the proxy has to be the first interface, if more than one interface is connected to some network.
This lead to my solution: http://www.geurtsrus.com/gerke/2005/01/proxy-auto-configuration-blues.html
Paragraph starts with: Credits to Oliver Presland (Microsoft UK) ...