OpenVPN / openvpn

OpenVPN is an open source VPN daemon
http://openvpn.net
Other
10.6k stars 2.96k forks source link

push "route-metric 10" invalid #574

Open huangshaokun opened 1 month ago

huangshaokun commented 1 month ago

openvpn Connect can push route metric successfully, but openvpn gui does not push route metric successfully.

schwabe commented 1 month ago

Please include more details.

huangshaokun commented 1 month ago

openvpn Connect log openvpn

openvpn gui log 0CCAA6~1

schwabe commented 1 month ago

Sure. But what is your actual problem? That is just a diffrence in logs between two completely different implementations. Is there an actual problem you are trying to solve or are you just pointing out a difference in implementation/logging?

huangshaokun commented 1 month ago

Of course, I'm asking an actual question, not the log, just because I found this log when checking the problem. Metric does not take effect, causing domain name resolution to still go to the original network (meaning that the dns set by openvpn does not take effect)

This is my configuration in openvpn.conf push "dhcp-option DNS 192.168.5.1" push "route-metric 10"

When using openvpn Connect as the client, the domain name resolution request is 192.168.5.1 But when I use openvpn gui as the client, the domain name resolution is not 192.168.5.1, but the dns server configured in the local network.

During the inspection, it was found that the metric did not take effect when using openvpn gui.

When using openvpn gui as the client, I manually changed the metric to 10 on win10 and it became normal.

During the test, I used nslookup to check which server the domain name resolution requested, and route print to check the metric of the route.

schwabe commented 1 month ago

That sounds like to completely different issues. Also be aware that nslookup is not playing nicely with NRPT, so it might be misreporting what DNS server you are actually using.