Page 1 of 1

Connect to openvpn server but use local interface to browse internet on Windows client

Posted: Fri Oct 21, 2022 3:45 pm
by desma
Hello, I have this situation, I have a

Windows Server 2012 r2 running openvpn server

and 2 client computers

1- Windows 7
2- Linux Ubuntu 20.04

I would like to connect them to my openvpn server for sharing files but not for internet browsing.

On the Linux clent after connects to openvpn I can ping my server on 10.7.0.1 but I can also browse internet, my ip is the one assigned by my ISP, not the server public ip, which is what I want.

The Windows 7 client instead (tested also on a Windows 10 pc) after connecting to my vpn can't browse internet, despite the lan network interface says "Internet access"

Does anyone have some experience on this? How can I solve? I'm asking becouse I did not find clear answers atlist for me. I tried to add client option "route-nopull" but did not help.

The following are the options in the configs:

Server Config
port 1194
proto udp4
dev tun
topology subnet
server 10.7.0.0 255.255.255.0
keepalive 10 120
persist-key
persist-tun
verb 3
explicit-exit-notify 1


client, both linux and windows clients with same options

client
dev tun
proto udp4
remote xxx.xxx-xxx-xxx 1194
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
cipher AES-256-CBC
ignore-unknown-option block-outside-dns
setenv opt block-outside-dns # Prevent Windows 10 DNS leak
# don't push internet traffic to vpn
# route-nopull
verb 3
key-direction 1

Re: Connect to openvpn server but use local interface to browse internet on Windows client

Posted: Fri Oct 21, 2022 4:21 pm
by openvpn_inc
Hello,

I haven't looked at the entire config yet, but, I notice you don't want to redirect Internet, and you're not pushing DNS. That makes sense, but then why are you implementing this rule to block outside DNS? That might lead to a non-working DNS situation, and you're not doing anything with DNS anyway.

> setenv opt block-outside-dns # Prevent Windows 10 DNS leak

On your Windows 7 client you might want to do things like 'ping 8.8.8.8' and 'ping google.com' and see what happens. If the first one works but the second fails, your Internet is working, but your DNS is broken. Perhaps related to that setting I mentioned.

Good luck,
Johan

Re: Connect to openvpn server but use local interface to browse internet on Windows client

Posted: Sat Oct 22, 2022 6:42 pm
by desma
openvpn_inc wrote:
Fri Oct 21, 2022 4:21 pm
why are you implementing this rule to block outside DNS? That might lead to a non-working DNS situation
> setenv opt block-outside-dns # Prevent Windows 10 DNS leak
Thank you for your help, removing that options solved my problem!

Re: Connect to openvpn server but use local interface to browse internet on Windows client

Posted: Sun Oct 23, 2022 1:25 pm
by openvpn_inc
Hello desma,

Glad to hear my first hunch worked.

Kind regards,
Johan