How to only route specific traffic through VPN

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
MorayM
OpenVpn Newbie
Posts: 4
Joined: Tue Jan 31, 2023 5:45 pm

How to only route specific traffic through VPN

Post by MorayM » Tue Jan 31, 2023 5:50 pm

Hi, I've setup a VPN to securely access remote servers but have found that all my traffic is being routed through the VPN instead of just the traffic I've specified. I've added route and route-nopull lines to my config file but am still having this issue on both OpenVPN Connect for Windows and Tunnelblick for Mac. Can anyone see what I've done wrong here? My config file (minus certs) is shown below:

client

client
proto udp
explicit-exit-notify
remote <IP redacted> 1194
dev tun
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
verify-x509-name <redacted> name
auth SHA256
auth-nocache
cipher AES-128-GCM
tls-client
tls-version-min 1.2
tls-cipher TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256
ignore-unknown-option block-outside-dns
setenv opt block-outside-dns # Prevent Windows 10 DNS leak
verb 3
route-nopull
route 10.0.0.0 255.255.0.0 # CIDR range of my remote servers

MorayM
OpenVpn Newbie
Posts: 4
Joined: Tue Jan 31, 2023 5:45 pm

Re: How to only route specific traffic through VPN

Post by MorayM » Fri Feb 03, 2023 9:18 am

Anyone? I can provide more information if necessary?

MorayM
OpenVpn Newbie
Posts: 4
Joined: Tue Jan 31, 2023 5:45 pm

Re: How to only route specific traffic through VPN

Post by MorayM » Thu Feb 16, 2023 4:41 pm

Any ideas anyone? I'm still no closer to figuring this one out.

Post Reply