Hello, all.
I would like to raise a very old issue (as far as from 2005-th year) about operating OpenVPN under Windows over PPP-based WAN (3G modem, PPTP, L2TP, PPPoE and so on).
The problem is that Windows does spontaneously set the metric of all interfaces as it wishes after PPP link activates, despite all thinkable settings. No matter what YOU want. No matter what settings you define in "Network Connections", OpenVPN configs and so on. The devilish Windows makes the metric of outgoing PPP WAN interface to possess a minimal possible value. So, all other network interfaces, including TAP-Win32 Adapters, get a random and a very high metric (the lowest priority).
Because of this, OpenVPN routes assignment via IPAPI goes broken. For example:
Wed Dec 25 10:16:23 2013 us=731036 C:\Windows\system32\route.exe ADD 192.168.9.33 MASK 255.255.255.255 192.168.30.13
Wed Dec 25 10:16:23 2013 us=746637 ROUTE: route addition failed using CreateIpForwardEntry: Íåâåðíû îäèí èëè íåñêîëüêî àðãóìåíòîâ. [status=160 if_index=23]
Wed Dec 25 10:16:23 2013 us=762237 Route addition via IPAPI failed [adaptive]
Wed Dec 25 10:16:23 2013 us=762237 Route addition fallback to route.exe
Wed Dec 25 10:16:23 2013 us=762237 env_block: add PATH=C:\Windows\System32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
This can be jumped around by adding in config the lines such as
setenv PATH "C:\\Windows\\System32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem"
route-method exe
route-delay 3
But this is only a half of the trouble.
The second half of the trouble represents DNS client/server behaviour. For example, if you wish to re-define client's DNS settings via
push "dhcp-option DOMAIN my.company.local"
push "dhcp-option DNS 192.168.30.1"
then you will fail. Because Windows will
always use DNS servers from interface with minimal metric. That is PPP WAN interface, but NOT the virtual OpenVPN network card. Thus, you have no way to reassign DNS servers for an OpenVPN client if the latter uses any kind of PPP internet connection (modem, PPTP, L2TP, PPPoE).
So, my main question is what ways can there be either to beat such Windows behaviour (preferable) or to work-around it. I have a great need to connect users to my OpenVPN servers in a most automatic (unattended) transparent manner. And theese aforesaid metric and DNS reassignment issues make the OpenVPN unusable in my situation.