Which VPN Tunnel Style Routes Only Certain Types of Traffic in 2026
Split tunneling and other things are what VPN providers tell you, but in reality, not all traffic should go through a VPN. To navigate this, you could do something called split tunneling.
Welcome back to Dev Odyssey, a developer’s journey through IT, where I cover tutorials and reviews of IT tools and technologies. I’m your host, Oris, and in this episode, we’re covering split tunneling and policy-based routing.
What Is Split Tunneling?
First off, what exactly is split tunneling? It’s a technique used in networking for forwarding and routing packets according to pre-written policies or filters.
Split tunneling is also referred to as policy-based routing, and in my research, I couldn’t find many differences between the two except for a couple.
VPN providers tend to use the term split tunneling and offer VPN desktop applications capable of split tunneling. These apps can split tunnel traffic per desktop application like Chrome, Microsoft Office apps, and more.
Read More: Best VPN on Router: The BEST Way to Secure Your Home Wi-Fi
Policy-based routing does not route traffic per desktop application and is usually terminology for networking equipment like routers and firewalls.
Generally speaking, split tunneling is usually associated with only VPN interfaces. Policy-based routing allows you to create routing policies based on port, IP, domain, MAC address, and protocol for sending traffic through your interface of choice.
This term is usually associated with any layer 3 interface, including VPN interfaces. Regardless of the terminology used, they both accomplish similar goals.
Why Use Split Tunneling?
With that in mind, what could those goals be?
For starters, it enables you to access geo-blocked content by routing domains or websites of your choice through a VPN interface.
In the same regard, you can route websites that don’t need to go through a VPN for reasons of preserving VPN bandwidth, preserving access to your local network, and more.
Not all traffic should go through a VPN, and with split tunneling or policy-based routing, you’re able to achieve that.
Setup and Requirements
For this demonstration, I’ll be using my Raspberry Pi hotspot I recently made.
For software, I’ll be using OpenWrt 22.03 and the package is PBR and LuCI app PBR.
Just to note, the PBR package has undergone some changes since the prior release of OpenWrt 21.02. Before 22.03, PBR used iptables to create policies. In 22.03 and beyond, it uses nftables.
Read More: Complete NordVPN Reviews: How to Use NordVPN on All Devices in 2026
There are some differences between these backends. However, from a front-end standpoint of the PBR UI, you shouldn’t see a significant difference.
For my interfaces, I’ll be using a WAN interface and two VPN interfaces: WireGuard and OpenVPN.
Interfaces Overview
As you can see, we have a WAN interface, a WireGuard interface named WG, and an OpenVPN interface named ovpn.
These interfaces are both being tunneled to different IPs so we can verify that our policies are working.
At the Services tab, we’ll find policy routing where we will review the options.
Under the Status section:
- Service status shows whether it’s running or stopped.
- Service gateways show the interfaces you are connected to, their IP addresses, and which is the default gateway.
- Service control allows you to start, restart, stop, enable, or disable the service.
In my setup, I have WAN as the default gateway.
Configuration Settings
Under Basic Configuration:
- Output verbosity controls logging detail.
- Strict enforcement ensures policies always work, even if the gateway is down.
- Use resolver set support for domains improves performance but requires setup.
- IPv6 support is disabled in my case.
Under Advanced Configuration:
- Supported interfaces allow specifying which interfaces to use.
- Ignored interfaces exclude specific interfaces, often server VPN interfaces.
Under Web UI Configuration:
- Add ignore target helps exclude certain traffic.
- Supported protocols allow additional protocol definitions.
DSCP Tagging and Custom Settings
The DSCP tagging section refers to Differentiated Services Code Point. It is used for identifying latency-sensitive traffic for prioritization during network congestion.
Custom user file includes define scripts used to map domains to IPs. This is useful for streaming services like Netflix, AWS, and Hulu.
Creating Policy Rules
Now let’s create example policies.
Go to the Policy section and click Add.
First Policy (WireGuard)
- Name: ipinfo WG test
- Local addresses: leave blank
- Local ports: leave blank
- Remote address/domain: ipinfo.io
- Remote port: 443
- Protocol: TCP
- Chain: pre-routing
- Interface: WG
Click save.
Second Policy (OpenVPN)
- Name: ifconfig OpenVPN test
- Local addresses: leave blank
- Local ports: leave blank
- Remote address/domain: ifconfig.me
- Remote port: 443
- Protocol: TCP
- Chain: pre-routing
- Interface: ovpn
Click save.
Testing the Policies
To test, use the terminal.
First, test the default gateway (WAN):
Run curl http://ip-api.com
This returns your ISP IP.
Next, test WireGuard:
Run curl ipinfo.io
This IP should match the WireGuard endpoint.
Finally, test OpenVPN:
Run curl ifconfig.me
This IP should differ from the others, confirming correct routing.
Benefits of Policy-Based Routing
Split tunneling and policy-based routing are powerful tools in a network admin’s arsenal.
With the ability to decide what traffic leaves which interface, you can customize your network to suit your bandwidth, media, and privacy needs.
The flexibility in defining policies allows precise control over traffic routing and improves performance and user experience.
FAQ
What is split tunneling?
Split tunneling is a networking technique that allows some traffic to go through a VPN while other traffic goes through the regular internet connection.
What is policy-based routing?
Policy-based routing is a method of directing network traffic based on specific rules such as IP address, domain, or protocol.
What is the difference between split tunneling and policy-based routing?
Split tunneling is commonly used in VPN applications and works per app, while policy-based routing is used in networking devices and works based on defined rules.
Why should not all traffic go through a VPN?
Routing all traffic through a VPN can reduce speed, increase latency, and limit access to local network resources.
What tools are used in this setup?
This setup uses OpenWrt 22.03, PBR, LuCI app PBR, WireGuard, and OpenVPN.
Conclusion
That covers our quick demo on split tunneling and policy-based routing. As demonstrated, these techniques allow you to control how your traffic is routed and optimize your network setup effectively.







