OpenVPN client but dont use the internet via VPN, only use the subnet


How are you?

I have created in OpenWrt a vpn client with OpenVPN. It works, but the problem is, that it using the internet from my vpn, but I just want to use that subnet so the network, but it is slow using my as an internet IPS, besides I just need to subnets dedicated for my vpn.
How can I disable use the vpnclient as a ISP and just the subnets I need and the internet should be used as it connected to the router?

I used this:

But it routes all traffic to the VPN client, while I need the internet from my local router ISP.

I supposed it is somewhere here:

dev tun
proto udp
remote 1194
resolv-retry infinite
# maybe only in Windows?
# if not working, use this
# ns-cert-type
remote-cert-tls server
key-direction 1
verb 1
mute 20
askpass /etc/openvpn/secret.key
cipher AES-256-CBC
# uncomment for Windows 7 clients
#route-method exe
#route-delay 2

OK, i solved it as on the server comment this line:
#list push 'redirect-gateway def1'

Now my internet is on my local ISP instead of via OpenVPN.

1 Like

You can also do it on the side of VPN-client:

pull-filter ignore redirect-gateway

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.