Running an encrypted tunnel directly on your home gateway is the gold standard for network-wide privacy in 2026. However, routing every single packet through a remote server often introduces unintended friction: competitive multiplayer games suffer from increased ping, local banking portals trigger fraud alerts, and smart home hubs lose LAN discovery. Mastering a step by step per app split tunneling dd wrt router vpn configuration solves this dilemma permanently by letting you dictate exactly which applications use the encrypted tunnel and which bypass it via your regular ISP gateway.
Before diving into advanced packet marking and Policy-Based Routing (PBR), your router needs an active, functional tunnel interface (such as tun1 for OpenVPN or wg0 for WireGuard). If you have not yet established your baseline connection, follow the official WorldVPN VPN On DD WRT Router setup guide to get your initial cryptographic handshake running smoothly. Once your baseline tunnel is operational, this comprehensive guide will show you how to isolate traffic by application ports, destination Autonomous System Numbers (ASNs), and domain lists.
Why Per-App Split Tunneling on a Router is Different
When you use a desktop client like our Free VPN for Windows or a mobile app, the operating system kernel has direct visibility into the process tree. It knows whether a packet originated from chrome.exe, discord.exe, or a background system service. A DD-WRT router, however, operates at Layer 3 (Network) and Layer 4 (Transport) of the OSI model. By the time a packet leaves your laptop or smart TV and hits the router's LAN bridge (br0), the executable name is stripped away.
To achieve per-application split tunneling on DD-WRT in 2026, network engineers rely on three deterministic identifiers:
- Transport Layer Ports (TCP/UDP): Routing specific application ports—such as BitTorrent ports, VoIP UDP ranges, or gaming traffic—through or around the VPN.
- DNSMasq IPSet Resolution: Capturing DNS queries for specific application domains (e.g.,
netflix.com,api.telegram.org) and dynamically adding their resolved IPv4 addresses into a kernel routing table. - Source IP + Destination Subnet Pairing: Isolating specific devices (like an Apple TV or PS5) and only tunneling traffic when those devices communicate with specific external cloud servers.
💡 Don't Want to Flash or Script Your Router?
Configuring Linux routing tables on embedded hardware requires patience. If you simply want instant, zero-configuration split tunneling on your personal devices, FreeVPN 724 provides 200MB of free VPN data every single day across Android, iOS, Windows, and macOS via the official WorldVPN application. Your data allowance refreshes automatically every 24 hours with NO credit card and NO email registration required. For heavy router-level usage, you can always upgrade to WorldVPN Premium Plans (starting at $1.12/month) for unlimited bandwidth, 10Gbps gigabit server speeds, and 200+ global locations.
Prerequisites & 2026 DD-WRT Firmware Requirements
Not all DD-WRT builds handle Policy-Based Routing identically. In 2026, you should be running a recent release (ideally r54000 or newer) on an ARMv8 or MIPS64 router with at least 128MB of RAM. Furthermore, while OpenVPN using AES-256-GCM cipher negotiation remains widely used for TCP fallback, modern DD-WRT builds offer native WireGuard support, which significantly reduces CPU context-switching overhead when processing complex iptables rules.
| Split Tunneling Method | DD-WRT Mechanism | Best Use Case in 2026 | CPU Overhead |
|---|---|---|---|
| Source IP Routing (PBR) | GUI Policy-Based Routing field | Tunneling a whole Smart TV or NAS while excluding work laptops | Very Low |
| Port-Based App Routing | iptables -t mangle + fwmark | Isolating VoIP apps, gaming consoles, or P2P clients by port | Low |
| Domain / IPSet Routing | dnsmasq + ipset + ip rule | Streaming apps (Netflix, BBC iPlayer) and cloud web apps | Moderate |
| Protocol / DPI Marking | Netfilter Connmark / DSCP tagging | Routing specific app traffic tagged by OS QoS policies | Moderate to High |
Method 1: Native GUI Policy-Based Routing (By Device & Subnet)
Before writing custom firewall scripts for individual ports, it is essential to understand how DD-WRT's built-in Policy-Based Routing works. By default, when a VPN client connects, the server pushes the redirect-gateway def1 directive, forcing all LAN traffic into the tunnel. To split-tunnel, we must stop the VPN from hijacking the default route and instead selectively push traffic into it.
- Log into your DD-WRT web interface and navigate to Services > VPN (or Setup > Tunnels if you are configuring a WireGuard interface).
- Under the OpenVPN Client section, ensure your basic parameters (Server IP/Name, Port, Tunnel Device
TUN, Tunnel ProtocolUDP, Encryption CipherAES-256-GCM, and Hash AlgorithmSHA256) are populated. - Locate the Advanced Options toggle and set it to Enable.
- In the Additional Config box, add the directive
route-nopull. This crucial command tells DD-WRT to establish the encrypted tunnel without overwriting your router's primary WAN default gateway. (Note: If you prefer the VPN to be the default for everyone except certain apps, omitroute-nopull). - Locate the Policy Based Routing text box. Here, you can enter CIDR subnets or static LAN IPv4 addresses separated by new lines (e.g.,
192.168.1.50/32). - Click Save and then Apply Settings.
While the GUI box is great for whole devices, it only accepts IP addresses and subnets. To achieve true per-application split tunneling on DD-WRT, we need to move to the command script engine.
Method 2: Step by Step Per App Split Tunneling DD WRT Router VPN via Port Marking
Many applications use predictable TCP and UDP port ranges. For example, if you live in a region with strict VoIP censorship and are researching How to Unblock FaceTime in UAE: Fast & Free Guide (2026) or How to Unblock Telegram Calls in UAE: Fast Free Guide, you probably do not want your entire home's PlayStation downloads or local web browsing slowed down by an overseas VPN hop. Instead, you can route only the ports used by those real-time communication apps through the DD-WRT tunnel.
Step 1: Verify Your Tunnel Interface Name
Open the DD-WRT web GUI and navigate to Administration > Commands. In the command shell box, enter the following command and click Run Commands:
ip addr show
Look for your active VPN interface. On DD-WRT OpenVPN clients, this is almost always tun1. On WireGuard setups, it will be wg0 or oet1. Note the peer gateway IP associated with that interface.
Step 2: Create a Custom Routing Table and Firewall Mark
In Linux networking, we cannot specify TCP/UDP ports directly inside an ip route command. Instead, we use iptables to inspect packets as they enter the router, apply a hexadecimal tag (fwmark) to packets matching our target application ports, and then instruct the kernel's routing policy database (RPDB) to send any packet carrying that tag into our VPN routing table.
Navigate to Administration > Commands, paste the following script into the command box, and click Save Firewall:
#!/bin/sh
# Define variables
VPN_IF="tun1"
VPN_TABLE="200"
FWMARK="0x200"
# Flush existing custom rules in table 200
ip route flush table $VPN_TABLE
ip rule del fwmark $FWMARK table $VPN_TABLE 2>/dev/null
# Get current VPN gateway IP dynamically
VPN_GW=$(ip route show dev $VPN_IF | awk '/proto kernel/ {print $1}')
# Populate Table 200 with the VPN default route
ip route add default via $VPN_GW dev $VPN_IF table $VPN_TABLE
ip route flush cache
# Tell kernel to route packets marked with 0x200 via Table 200
ip rule add fwmark $FWMARK table $VPN_TABLE priority 1000
# Clear old mangle rules to prevent duplicates
iptables -t mangle -F PREROUTING
# EXAMPLE 1: Route FaceTime / Apple Call Ports (UDP 16384-16403) through VPN
iptables -t mangle -A PREROUTING -i br0 -p udp --dport 16384:16403 -j MARK --set-mark $FWMARK
# EXAMPLE 2: Route Telegram VoIP / Custom App Ports (UDP 1400, 5222) through VPN
iptables -t mangle -A PREROUTING -i br0 -p udp -m multiport --dports 1400,5222 -j MARK --set-mark $FWMARK
# Enable NAT Masquerading on the VPN interface
iptables -t nat -C POSTROUTING -o $VPN_IF -j MASQUERADE 2>/dev/null || iptables -t nat -A POSTROUTING -o $VPN_IF -j MASQUERADEOnce you click Save Firewall, DD-WRT executes these rules automatically every time the firewall restarts or the WAN/VPN link comes up. Every device on your Wi-Fi will now use your normal ISP connection for standard web browsing, while packets matching your target application ports are seamlessly intercepted and routed over the encrypted tun1 interface.
Method 3: Domain-Based App Split Tunneling with DNSMasq and IPSet
What if the application you want to isolate runs over standard HTTPS port 443—the exact same port used by every website on the internet? You cannot block or route port 443 without routing all web traffic. In 2026, streaming apps, AI assistants, and cloud platforms distribute their traffic across massive Content Delivery Networks (CDNs). To split-tunnel a specific web application on DD-WRT, we combine ipset with dnsmasq.
How DNSMasq IPSet Works
When you open an app on your phone or smart TV, the very first thing it does is send a DNS query to your DD-WRT router asking for the IP addresses of its backend servers. By configuring DD-WRT's dnsmasq service to watch for specific base domains, the router automatically grabs the resolved IPv4 addresses and drops them into an in-memory kernel hash list (an ipset) before handing the DNS reply back to your device. An iptables rule then routes any packet destined for that ipset through the VPN.
Step-by-Step Configuration
- First, create the
ipsetand attach it to your firewall script. Navigate to Administration > Commands and append these lines to your Firewall Script:
# Create an ipset named 'vpn_domains' for IPv4 hashes
ipset create vpn_domains hash:ip family inet 2>/dev/null
# Mark any packet from LAN (br0) destined for an IP inside 'vpn_domains'
iptables -t mangle -A PREROUTING -i br0 -m set --match-set vpn_domains dst -j MARK --set-mark 0x200- Next, navigate to Services > Services in the DD-WRT GUI and scroll down to the DNSMasq section.
- Ensure DNSMasq is Enabled and No DNS Rebind is configured according to your security preference.
- In the Additional DNSMasq Options text box, add the
ipsetdirective targeting the base domains of the applications you wish to tunnel:
ipset=/netflix.com/nflxvideo.net/nflximg.net/nflxext.com/vpn_domains
ipset=/openai.com/chatgpt.com/vpn_domains
ipset=/discord.gg/discordapp.com/discord.media/vpn_domains- Click Save and Apply Settings, then reboot your client devices (or run
ipconfig /flushdns) so they are forced to perform fresh DNS lookups through the router.
If you find that DD-WRT's NVRAM constraints or specific build variations limit your ability to install advanced ipset modules, you may also want to explore alternative router firmwares. For instance, Linux enthusiasts who prefer granular package management via opkg and the vpn-policy-routing package can check out the WorldVPN VPN On OpenWrt Router setup guide. Similarly, if you own Asus hardware and want a graphical, drop-down menu approach (VPN Director) without writing shell scripts, read our WorldVPN VPN On ASUSWRT Router setup guide.
Preventing DNS Leaks and Killing Kill-Switch Conflicts
When implementing a step by step per app split tunneling dd wrt router vpn setup, two common pitfalls can break connectivity: Reverse Path Filtering (rp_filter) and DNS leaks.
1. Disabling Strict Reverse Path Filtering
Linux kernels include a security feature called Reverse Path Filtering designed to prevent IP spoofing. If a packet leaves via tun1 and the return traffic enters via tun1, the kernel checks the main routing table to see if tun1 is the default route. In a split-tunnel setup where your ISP WAN is the default route, strict rp_filter (value 1) will silently drop the return VPN packets! To fix this, always add the following lines to your DD-WRT Startup or Firewall script to set loose mode (value 2) or disable it (value 0) on the tunnel interface:
echo 2 > /proc/sys/net/ipv4/conf/all/rp_filter
echo 2 > /proc/sys/net/ipv4/conf/default/rp_filter
echo 2 > /proc/sys/net/ipv4/conf/tun1/rp_filter2. Handling Encrypted DNS (DoH / DoT) on Client Devices
If you rely on Method 3 (DNSMasq IPSet routing), your router must be able to see the DNS queries coming from your devices. In 2026, modern browsers (Chrome, Firefox, Brave) and mobile OS versions often enable DNS-over-HTTPS (DoH) by default, bypassing your DD-WRT router's local DNS resolver entirely. To ensure your per-app domain rules work reliably:
- Disable "Secure DNS" or "Private Relay" inside the specific browser or device you are split-tunneling, forcing it to use your router's LAN IP (e.g.,
192.168.1.1) for DNS resolution. - Configure DD-WRT itself to forward all DNS queries over an encrypted upstream resolver or through the VPN tunnel so your ISP still cannot snoop on your lookups.
💡 Need Split Tunneling Away From Your Home Router?
Your DD-WRT router protects your home LAN, but the moment you step out onto campus Wi-Fi, hotel networks, or cellular data, your router rules no longer apply. Check out our guide on How to Bypass VPN Blocks on School and Work Wi-Fi and install our free 200MB daily VPN app on your smartphone or laptop. You get 200MB of free high-speed encrypted data every 24 hours with zero registration, plus built-in per-app split tunneling directly inside the mobile UI!
Frequently Asked Questions (FAQ)
Can DD-WRT identify applications by their .exe or .apk file name?
No. Because DD-WRT operates as an external network gateway rather than a host operating system kernel, it cannot see local process names like spotify.exe. Instead, router-level per-app split tunneling works by matching the application's destination TCP/UDP ports, destination server IP subnets, or DNS domain queries via dnsmasq and ipset.
Why do my split-tunneled apps lose internet connection when the VPN is active?
In 90% of DD-WRT setups, this happens for one of two reasons: either you forgot to add the MASQUERADE NAT rule for your tun1 or wg0 interface in the POSTROUTING chain, or the Linux kernel's Reverse Path Filter (rp_filter) is dropping asymmetric return packets. Setting rp_filter to 2 (loose mode) on your tunnel interface resolves this immediately.
Is WireGuard better than OpenVPN for split tunneling on DD-WRT in 2026?
Yes. WireGuard operates directly inside the Linux kernel space and utilizes modern ChaCha20-Poly1305 encryption, whereas OpenVPN runs in user space and requires heavy context switching. When combining VPN encryption with complex iptables mangle rules on consumer router CPUs, WireGuard delivers up to 3x higher throughput and noticeably lower latency.
How can I get per-app split tunneling on my phone without editing router scripts?
If you only need to split-tunnel a few apps on your smartphone, tablet, or laptop, you do not need to modify your router at all. Simply download the official Free VPN for Android or iOS app powered by FreeVPN 724 and WorldVPN. You receive 200MB of free daily VPN data (refreshing every 24 hours with no email or credit card needed), and you can toggle individual apps on or off inside the app's settings menu in seconds.