Create Split Tunneling OSVPN Client on Windows

Abstract: Prevent OSVPN from becoming the default gateway on Windows to route only specific remote subnets through the tunnel while keeping local traffic direct.

Created: 2026-09-15 by
Configure split tunneling for the OSVPN client on Windows by modifying the connection’s IPv4 properties to use a custom metric. This prevents the VPN from becoming the default gateway, ensuring only traffic destined for specific remote subnets is routed through the encrypted tunnel while local network access remains direct and unaffected.

Understanding Split Tunneling Mechanics

Split tunneling allows you to send only selected traffic through your Virtual Private Network (VPN) while keeping other traffic on your regular internet connection. In standard VPN configurations, the server often pushes a "default route" that forces all internet traffic through the tunnel. This can slow down general browsing and block access to local resources like printers or intranet sites. By disabling this automatic default route assignment, you retain full control over which destinations traverse the secure channel. This approach is particularly useful when accessing corporate resources that reside in a specific subnet. You want those internal servers protected by encryption, but your daily web browsing should go through your faster, local ISP connection. The OSVPN client, like most robust Windows VPN implementations, respects the underlying routing table managed by the operating system. Therefore, the solution lies not in changing the VPN software itself, but in adjusting how Windows handles IP routing for that specific adapter.

Configuring the OSVPN Connection Properties

The primary method to achieve split tunneling involves manually adjusting the IPv4 settings of the OSVPN adapter. You must ensure that the VPN does not claim the entire address space as its own. Follow these steps to disable the automatic default gateway:
  1. Navigate to Settings > Network & Internet > VPN.
  2. Select your OSVPN connection from the list.
  3. Click on Edit or Advanced options depending on your Windows version.
  4. Locate the setting labeled "Use default gateway on remote network" or similar.
  5. Toggle this switch to Off.
When this option is disabled, the VPN client will no longer push a route with a destination of 0.0.0.0/0. Instead, it will only install routes for the specific subnets defined in the VPN profile. If your OSVPN profile does not specify any remote subnets, you may need to edit the connection details to include them. Without these specific routes, the tunnel might appear inactive for remote resources. For users managing multiple connections, this setting ensures that only the designated OSVPN tunnel receives remote traffic. Other VPNs or network adapters remain independent. This isolation prevents routing conflicts that could arise if two clients tried to claim the default gateway simultaneously.

Verifying Routing Tables and Metrics

After disabling the default gateway, you must verify that Windows is correctly routing traffic to your remote destinations. Open Command Prompt as an administrator and run the following command:
route print
Look for entries associated with your OSVPN adapter. You should see specific network ranges listed under the interface corresponding to your VPN. If you do not see any routes pointing to the remote network, the split tunnel is technically active but ineffective because no traffic is being directed into the tunnel. To troubleshoot missing routes, check the OSVPN client logs. Often, the server must explicitly advertise the networks it wants you to reach. If the server configuration is static, you may need to manually add routes using the route add command. However, this is rarely necessary if the VPN profile is correctly configured. It is also important to monitor the Metric value of your network interfaces. A lower metric indicates higher priority. Ensure that your local Ethernet or Wi-Fi adapter has a lower metric than the VPN adapter for non-remote traffic. Windows automatically adjusts this when you disable the default gateway, but manual verification prevents subtle issues where local traffic accidentally takes the slower VPN path.

Handling Local Network Access Issues

One common side effect of split tunneling is the inability to access local devices. If your computer cannot ping a printer on your home network after connecting to OSVPN, it is likely due to routing ambiguity. Windows might be confused about which interface to use for local broadcasts. To resolve this, ensure that your local subnet is not overlapping with the remote VPN subnet. Overlapping addresses cause severe routing conflicts that split tunneling cannot fix. If the subnets are distinct, you can force traffic to specific local IPs by adding explicit routes. For example, to ensure traffic to a local NAS goes directly:
route add 192.168.1.50 mask 255.255.255.255 192.168.1.1 -p
This command adds a persistent route for a specific device, ensuring it bypasses the VPN entirely. While powerful, this requires manual maintenance. For most users, simply disabling the default gateway is sufficient. If you experience connectivity drops, consider reviewing related guides on managing VPN interactions with local services. See our guide on Enabling File Printer Sharing with WireGuard on Windows: Creating New Tunnels for broader context on network isolation techniques.

Frequently Asked Questions

Why can't I access the internet after enabling split tunneling?

If your internet stops working, it is likely because the VPN client did not install any routes, leaving no path for traffic. Ensure that the OSVPN profile includes valid remote subnet definitions. Without these, the tunnel has nowhere to send data, and since the default gateway is off, general internet traffic falls through.

Does split tunneling reduce security for my browsing traffic?

Yes, by design. Traffic that does not go through the VPN is unencrypted and visible to your local ISP or network administrator. Only the traffic destined for the specified remote subnets benefits from encryption. Use split tunneling only when you trust your local network connection.

How do I remove specific routes added manually?

You can remove manually added routes using the route delete command followed by the destination IP and subnet mask. Be cautious when deleting routes, as removing the wrong entry can disrupt your network connectivity entirely. Always verify the route exists before deletion.

Can I use split tunneling with multiple VPN clients?

It is possible but complex. Each client must be configured to avoid claiming the default gateway. You will need to carefully manage metrics and specific routes to prevent conflicts. Consider using one primary VPN client for all remote access to simplify management and avoid routing loops.

What happens if the remote subnet changes?

If the remote network structure changes, you must update your OSVPN profile or manually adjust your routes. Static routes do not update automatically. Regularly review your network configuration to ensure your split tunneling setup remains accurate and efficient.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More