{"id":676,"date":"2026-03-26T19:49:12","date_gmt":"2026-03-26T19:49:12","guid":{"rendered":"https:\/\/blog.asambe.ai\/index.php\/2026\/03\/26\/home-lab-split-tunneling-vpns-traffic-shaping\/"},"modified":"2026-03-26T19:49:14","modified_gmt":"2026-03-26T19:49:14","slug":"home-lab-split-tunneling-vpns-traffic-shaping","status":"publish","type":"post","link":"https:\/\/blog.asambe.ai\/index.php\/2026\/03\/26\/home-lab-split-tunneling-vpns-traffic-shaping\/","title":{"rendered":"Home Lab Split Tunneling VPNs Traffic Shaping"},"content":{"rendered":"<p>Latency spikes, streaming buffers, and questions about what data leaves your network\u2014these are the reasons many tinkerers build a home lab. In this guide, you\u2019ll design a safe environment to test split tunneling, VPNs, and traffic shaping without disrupting your everyday internet.<\/p>\n<p>We\u2019ll cover concepts, hardware, a reference topology, step-by-step setup, and repeatable experiments you can run to measure and improve performance. No specialized background required\u2014just curiosity and a weekend.<\/p>\n<h2 id=\"table-of-contents\">Table of Contents<\/h2>\n<ul>\n<li><a href=\"#why-build-a-home-lab\">Why Build a Home Lab<\/a><\/li>\n<li><a href=\"#core-concepts\">Core Concepts<\/a><\/li>\n<li><a href=\"#design-overview\">Design Overview<\/a><\/li>\n<li><a href=\"#hardware-requirements\">Hardware You\u2019ll Need<\/a><\/li>\n<li><a href=\"#network-topology\">Network Topology &amp; IP Plan<\/a><\/li>\n<li><a href=\"#software-stack\">Software Stack &amp; Alternatives<\/a><\/li>\n<li><a href=\"#setup-steps\">Step-by-Step Setup<\/a><\/li>\n<li><a href=\"#test-scenarios\">Test Scenarios &amp; Experiments<\/a><\/li>\n<li><a href=\"#measurement-and-monitoring\">Measuring Results<\/a><\/li>\n<li><a href=\"#troubleshooting\">Troubleshooting<\/a><\/li>\n<li><a href=\"#security-and-ethics\">Security, Privacy &amp; Ethics<\/a><\/li>\n<li><a href=\"#budget-and-scaling\">Budget, Power &amp; Scale<\/a><\/li>\n<li><a href=\"#conclusion\">Conclusion<\/a><\/li>\n<li><a href=\"#faq\">Frequently Asked Questions<\/a><\/li>\n<\/ul>\n<h2 id=\"why-build-a-home-lab\">Why Build a Home Lab for Split Tunneling and QoS<\/h2>\n<p>Home networks are busier than ever. Work calls, 4K streaming, gaming, cloud backups, and smart devices compete for bandwidth. A lab lets you <em>see<\/em> what\u2019s happening and try improvements before applying them to your main network.<\/p>\n<p>With a dedicated space to test split tunneling, VPN clients\/servers, and traffic shaping, you can compare protocols, prioritize latency-sensitive apps, and verify that privacy choices work as intended.<\/p>\n<ul>\n<li>Measure real effects of VPN protocols on speed, latency, and reliability.<\/li>\n<li>Route specific apps or devices through a VPN while leaving others direct-to-internet.<\/li>\n<li>Reduce bufferbloat and stabilize calls and gaming with smart queuing (FQ-CoDel\/CAKE).<\/li>\n<li>Build a reusable, low-risk platform for future experiments.<\/li>\n<\/ul>\n<h2 id=\"core-concepts\">Core Concepts: Split Tunneling, VPNs, and Traffic Shaping<\/h2>\n<h3>Split Tunneling<\/h3>\n<p>Split tunneling sends only a subset of traffic through a VPN tunnel while the rest uses your regular connection. You can split by device, application, destination IP, or domain (FQDN). The goal is to balance privacy, performance, and compatibility.<\/p>\n<h3>VPN Protocols<\/h3>\n<p>Common choices include <strong>WireGuard<\/strong> (modern, efficient, UDP-based), <strong>OpenVPN<\/strong> (mature, flexible, UDP\/TCP), and IPSec\/IKEv2 (often used for site-to-site). Protocols differ in overhead, handshake behavior, and how they handle packet loss and MTU.<\/p>\n<h3>Traffic Shaping and QoS<\/h3>\n<p>Traffic shaping and QoS help your network stay responsive under load by controlling rates and queueing behavior. Algorithms like <strong>FQ-CoDel<\/strong> and <strong>CAKE<\/strong> reduce bufferbloat so web pages, voice, and games remain snappy even during big downloads.<\/p>\n<h2 id=\"design-overview\">Design Overview: A Simple, Safe Lab<\/h2>\n<p>We\u2019ll build a small environment that sits beside your everyday network. Test clients join the lab SSID or Ethernet port, pass through a virtualized router\/firewall, and optionally a VPN. Your primary home devices can continue using the normal router.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/via.placeholder.com\/800x400\" alt=\"Home lab network diagram: ISP modem &gt; lab firewall &gt; switch\/AP &gt; test clients; optional VPN tunnel\" \/><\/p>\n<ul>\n<li><strong>Isolation:<\/strong> Use a dedicated VLAN, SSID, or separate switch for lab devices.<\/li>\n<li><strong>Repeatability:<\/strong> Keep a clean snapshot of your router VM so you can roll back.<\/li>\n<li><strong>Observability:<\/strong> Include simple monitoring so you can quantify changes.<\/li>\n<\/ul>\n<p>You can run this as a dual-router setup (ISP modem &gt; main router &gt; lab router) or place the lab router directly behind the modem if your ISP supports bridge mode. The dual-router method is easiest because it keeps the lab\u2019s egress behind your usual NAT while letting you experiment freely.<\/p>\n<h2 id=\"hardware-requirements\">Hardware You\u2019ll Need<\/h2>\n<ul>\n<li><strong>Router\/firewall platform:<\/strong> A small x86 mini PC with 2+ NICs (e.g., Intel N5105\/N100) or an old desktop with an Intel 4-port NIC. Virtualization works well if you can pass multiple NICs to a VM.<\/li>\n<li><strong>Managed switch (optional but helpful):<\/strong> For VLANs and easy port segregation.<\/li>\n<li><strong>Access point (optional):<\/strong> A spare AP or your main AP with a dedicated lab SSID\/VLAN.<\/li>\n<li><strong>Test clients:<\/strong> A laptop and\/or Raspberry Pi for generating traffic and running measurements.<\/li>\n<li><strong>Storage\/UI:<\/strong> USB stick or SSD for router OS; monitor\/keyboard for the first boot if needed.<\/li>\n<\/ul>\n<p>Power and noise matter for 24\/7 labs. A modern low-power mini PC often idles below 10\u201315 W. If you repurpose an old tower, consider scheduled power or sleep when not testing.<\/p>\n<p>If you prefer an all-in-one, an OpenWrt-capable consumer router with enough CPU can work, especially for CAKE-based SQM. Verify available flash\/RAM and community support before flashing new firmware.<\/p>\n<h2 id=\"network-topology\">Network Topology &amp; IP Plan<\/h2>\n<p>Here is a simple, flexible plan you can adapt:<\/p>\n<ul>\n<li><strong>WAN:<\/strong> DHCP from your ISP modem or upstream router.<\/li>\n<li><strong>Lab LAN:<\/strong> 192.168.20.0\/24 (gateway 192.168.20.1).<\/li>\n<li><strong>Lab Guests (optional):<\/strong> 192.168.30.0\/24 for untrusted test hardware.<\/li>\n<li><strong>Management (optional):<\/strong> 192.168.10.0\/24 for your hypervisor and monitoring.<\/li>\n<li><strong>VLAN tags:<\/strong> 20 (lab), 30 (guests), 10 (mgmt) if using a managed switch\/AP.<\/li>\n<\/ul>\n<p>Reserve static IPs for your router\/firewall, monitoring host, and any servers. Keep a short list of subnets and gateways handy during setup.<\/p>\n<p>By default, the lab router will NAT traffic to the upstream, which is sufficient for testing. Keep inbound ports closed unless a test requires them, and document any exceptions.<\/p>\n<h2 id=\"software-stack\">Software Stack &amp; Alternatives<\/h2>\n<ul>\n<li><strong>Router\/firewall:<\/strong> pfSense CE\/Plus or OPNsense (policy-based routing, VPN clients, limiters\/queues).<\/li>\n<li><strong>Alternatives:<\/strong> OpenWrt (excellent SQM with CAKE), VyOS, or a Linux router using nftables and <em>tc<\/em>.<\/li>\n<li><strong>VPN endpoints:<\/strong> WireGuard or OpenVPN. You can connect to a commercial VPN provider or a self-hosted endpoint in the cloud (ensure you follow all applicable laws and provider terms).<\/li>\n<li><strong>Traffic generation:<\/strong> iPerf3, curl, speedtest CLI, and <a href=\"https:\/\/flent.org\/\">Flent<\/a> for latency-under-load tests.<\/li>\n<li><strong>Monitoring:<\/strong> ping, traceroute, tcpdump\/Wireshark, <a href=\"https:\/\/www.bufferbloat.net\/projects\/flent\/wiki\/Using_Tools\/\">fping\/Flent<\/a>, <a href=\"https:\/\/www.ntop.org\/products\/traffic-analysis\/ntop\/\">ntopng<\/a>, or lightweight dashboards like Netdata.<\/li>\n<\/ul>\n<h2 id=\"setup-steps\">Step-by-Step Setup<\/h2>\n<ol>\n<li><strong>Prepare the host.<\/strong>\n<ul>\n<li>Install a hypervisor (Proxmox, ESXi, Hyper-V) or run bare metal.<\/li>\n<li>Connect at least two NICs: one to WAN\/upstream, one to a lab switch\/AP.<\/li>\n<li>Label cables and note MAC addresses to avoid confusion later.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Install your router\/firewall.<\/strong>\n<ul>\n<li>Create a VM or install directly. Assign two vNICs\/ports: WAN and LAN.<\/li>\n<li>On first boot, set LAN to 192.168.20.1\/24 and confirm DHCP serves test clients.<\/li>\n<li>Verify outbound internet from a lab client before adding complexity.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Set up VLANs and SSIDs (optional but recommended).<\/strong>\n<ul>\n<li>Create VLAN 20 for lab, VLAN 30 for lab-guests on your switch\/AP.<\/li>\n<li>Trunk VLANs to the router port; assign interfaces and DHCP scopes per VLAN.<\/li>\n<li>Create a \u201cLab\u201d SSID mapped to VLAN 20 for easy device onboarding.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Configure VPN clients.<\/strong>\n<ul>\n<li>Import WireGuard or OpenVPN configs into pfSense\/OPNsense.<\/li>\n<li>Set up a gateway for the VPN interface and enable monitoring (DPinger).<\/li>\n<li>Create an <em>alias<\/em> for \u201cVPN-only\u201d destinations (IPs or FQDNs) to simplify rules.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Implement split tunneling (policy-based routing).<\/strong>\n<ul>\n<li>Add firewall rules on the Lab LAN: match source (device), destination (alias), or port, then set the Gateway to the VPN or to WAN as desired.<\/li>\n<li>Order matters: put specific rules above general \u201callow\u201d rules.<\/li>\n<li>For domain-based rules, use FQDN aliases with reasonable TTLs; test carefully because DNS resolution timing can affect routing.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Enable traffic shaping\/QoS.<\/strong>\n<ul>\n<li>Measure your true ISP up\/down while idle; set shaper rates ~5\u201310% below those figures.<\/li>\n<li>Use Limiters\/Queues with FQ-CoDel or CAKE (OpenWrt SQM) for best latency under load.<\/li>\n<li>Create simple priority: Voice\/Game high, Web medium, Bulk low. Start simple; refine later.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Harden basics and verify DNS.<\/strong>\n<ul>\n<li>Disable unnecessary services, use strong admin passwords, and restrict management to the management subnet.<\/li>\n<li>Decide on DNS: resolver vs forwarder, with or without DNS over HTTPS\/TLS.<\/li>\n<li>Check for DNS and IP leaks using reputable test sites from both \u201cVPN\u201d and \u201cDirect\u201d clients.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Snapshot and document.<\/strong>\n<ul>\n<li>Export your config, store a clean snapshot, and write down the test plan and baseline results.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h2 id=\"test-scenarios\">Test Scenarios &amp; Experiments<\/h2>\n<h3>1) Split Tunneling by Device, App, and Destination<\/h3>\n<ul>\n<li><strong>By device:<\/strong> Route a gaming PC through WAN (no VPN) while keeping a streaming stick on VPN.<\/li>\n<li><strong>By application\/port:<\/strong> Send VoIP (SIP\/RTP) and game ports direct; keep browser traffic on VPN.<\/li>\n<li><strong>By destination:<\/strong> Use IP\/FQDN aliases to send banking sites direct (for fewer challenges) while routing P2P or public Wi\u2011Fi laptops via VPN.<\/li>\n<\/ul>\n<p>Record throughput and latency for each case. Confirm that policy rules behave consistently across reboots and IP\/DNS changes.<\/p>\n<h3>2) VPN Protocol and Settings Comparisons<\/h3>\n<ul>\n<li>Test WireGuard vs OpenVPN (UDP and TCP). Measure upload\/download (iPerf3), latency (ping), and stability over 10\u201315 minutes.<\/li>\n<li>Experiment with MTU and MSS clamping. Start at 1420 for WireGuard as a reference, then adjust based on path MTU discovery.<\/li>\n<li>Compare cipher overhead for OpenVPN and observe CPU utilization on your router hardware.<\/li>\n<\/ul>\n<h3>3) QoS and Latency-Under-Load (Bufferbloat)<\/h3>\n<ul>\n<li>Using Flent\u2019s RRUL or simple parallel iPerf3 flows, generate heavy load while running ping to several stable targets (e.g., 1.1.1.1, 9.9.9.9).<\/li>\n<li>Enable FQ-CoDel or CAKE and set shaper rates slightly below your real line rate. Re-run tests and compare latency, jitter, and packet loss.<\/li>\n<li>Try different queue priorities: assign bulk transfers to a lower-priority queue and confirm calls remain clear during downloads.<\/li>\n<\/ul>\n<h3>4) Streaming, Gaming, and Work Calls<\/h3>\n<ul>\n<li>Join a test video call or watch a 4K stream while syncing a large file in the background. Verify the call\/stream remains smooth with QoS enabled.<\/li>\n<li>Measure input lag and jitter on a game while toggling VPN on\/off to understand the trade-offs.<\/li>\n<\/ul>\n<h3>5) Optional: Dual-WAN or Failover<\/h3>\n<ul>\n<li>If you have a secondary connection (cellular hotspot), test WAN failover and observe how VPN tunnels and QoS respond.<\/li>\n<\/ul>\n<h2 id=\"measurement-and-monitoring\">Measuring Results and Monitoring<\/h2>\n<p>Make experiments comparable by controlling variables. Use the same server targets, run tests at least 2\u20133 times, and log results with timestamps and configurations.<\/p>\n<ul>\n<li><strong>Throughput:<\/strong> iPerf3 to a reliable server (LAN, cloud VM, or a trusted public endpoint).<\/li>\n<li><strong>Latency and jitter:<\/strong> ping\/fping; Flent for combined graphs of latency-under-load.<\/li>\n<li><strong>Packet capture:<\/strong> Wireshark\/tcpdump to verify routes, DSCP markings, and MSS values.<\/li>\n<li><strong>System load:<\/strong> CPU\/memory on the router, especially during encryption-heavy tests.<\/li>\n<\/ul>\n<p>Store measurements in a simple CSV or a lightweight time-series tool. Even a spreadsheet comparing \u201cbefore\/after\u201d with notes about MTU, queue settings, and rule changes will help you draw confident conclusions.<\/p>\n<p>Run tests at different times of day to account for upstream congestion. Clear CDN\/browser caches when evaluating web performance, and use the same download sources to reduce variance.<\/p>\n<h2 id=\"troubleshooting\">Troubleshooting<\/h2>\n<ul>\n<li><strong>\u201cVPN works but some sites hang.\u201d<\/strong> Likely MTU\/MSS issues. Lower the tunnel MTU or enable MSS clamping on LAN\/VPN interfaces.<\/li>\n<li><strong>\u201cLatency spikes when saturating upload.\u201d<\/strong> Your shaper rate is too high or queueing is disabled on egress. Reduce the set rate 5\u201310% and confirm FQ-CoDel\/CAKE is applied to the correct interface.<\/li>\n<li><strong>\u201cRules don\u2019t seem to apply.\u201d<\/strong> Check rule order, aliases (expand them to see current IPs), and which interface the traffic enters. Verify that the VPN gateway is up.<\/li>\n<li><strong>\u201cDNS looks wrong.\u201d<\/strong> Ensure lab clients use the intended DNS resolver and that DNS-over-HTTPS\/TLS choices are consistent with your split tunneling rules.<\/li>\n<li><strong>\u201cVPN gateway flaps up\/down.\u201d<\/strong> Check upstream stability, monitor targets, and keep-alive intervals. Consider switching to a closer VPN endpoint.<\/li>\n<\/ul>\n<h2 id=\"security-and-ethics\">Security, Privacy &amp; Ethics<\/h2>\n<ul>\n<li>Keep the lab segmented from your main network and sensitive devices.<\/li>\n<li>Use strong admin credentials and limit management access to known IPs.<\/li>\n<li>Only test on networks and systems you own or have explicit permission to use.<\/li>\n<li>Respect laws, service agreements, and content licenses. Don\u2019t use VPNs to violate terms or bypass restrictions unlawfully.<\/li>\n<li>When using commercial VPNs or cloud providers, follow their acceptable-use policies and rate limits.<\/li>\n<li>Document changes so you can revert quickly if something behaves unexpectedly.<\/li>\n<\/ul>\n<h2 id=\"budget-and-scaling\">Budget, Power &amp; Scale<\/h2>\n<p>You can start small: a $150\u2013$300 mini PC with dual NICs, a used managed switch, and your existing AP are enough. Add components only when a test requires them.<\/p>\n<ul>\n<li><strong>Entry:<\/strong> Mini PC + existing switch\/AP; target under 15 W idle.<\/li>\n<li><strong>Intermediate:<\/strong> Add a managed switch and a separate AP with VLAN support.<\/li>\n<li><strong>Advanced:<\/strong> Dedicated lab rack, UPS, remote logging\/metrics, and a self-hosted VPN endpoint in the cloud.<\/li>\n<\/ul>\n<p>When scaling, watch for CPU bottlenecks (encryption), NIC offloading quirks, and disk wear if you keep packet captures or flow logs. Upgrade deliberately and re-baseline after each change.<\/p>\n<h2 id=\"conclusion\">Conclusion<\/h2>\n<p>A thoughtful home lab gives you a controlled way to test split tunneling, compare VPNs, and shape traffic so the network feels fast even under pressure. Start with isolation, simple rules, and solid measurements; then iterate.<\/p>\n<p>The payoff is clarity: you\u2019ll know what helps, what doesn\u2019t, and why. Capture your baseline, make one change at a time, and enjoy a smoother, more private network on your terms.<\/p>\n<h2 id=\"faq\">Frequently Asked Questions<\/h2>\n<p><strong>Is it safe to run this alongside my main home network?<\/strong><\/p>\n<p>Yes\u2014if you segment the lab using a separate VLAN\/SSID or switch and keep management locked down. Avoid bridging the lab directly into sensitive subnets.<\/p>\n<p><strong>Do I need a static public IP or special ISP plan?<\/strong><\/p>\n<p>No. DHCP from your ISP is fine. If you self-host a VPN server, a dynamic DNS name helps clients find you after IP changes.<\/p>\n<p><strong>Which VPN is better: WireGuard or OpenVPN?<\/strong><\/p>\n<p>WireGuard is typically faster and simpler; OpenVPN is widely supported and flexible. Test both on your hardware and path to see which meets your needs.<\/p>\n<p><strong>Will split tunneling leak data?<\/strong><\/p>\n<p>It can if rules or DNS aren\u2019t aligned. Decide which traffic must use the VPN, set clear policies, verify with leak tests, and monitor periodically.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Build a safe home lab to test split tunneling, VPNs, and traffic shaping. Get hardware tips, setup steps, and real tests to tune speed, privacy, and QoS.<\/p>\n","protected":false},"author":1,"featured_media":675,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[8],"tags":[],"class_list":["post-676","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog-posts"],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/i0.wp.com\/blog.asambe.ai\/wp-content\/uploads\/2026\/03\/2026-03-26-19-49-04-data.png?fit=1024%2C1024&ssl=1","_links":{"self":[{"href":"https:\/\/blog.asambe.ai\/index.php\/wp-json\/wp\/v2\/posts\/676","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.asambe.ai\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.asambe.ai\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.asambe.ai\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.asambe.ai\/index.php\/wp-json\/wp\/v2\/comments?post=676"}],"version-history":[{"count":1,"href":"https:\/\/blog.asambe.ai\/index.php\/wp-json\/wp\/v2\/posts\/676\/revisions"}],"predecessor-version":[{"id":677,"href":"https:\/\/blog.asambe.ai\/index.php\/wp-json\/wp\/v2\/posts\/676\/revisions\/677"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.asambe.ai\/index.php\/wp-json\/wp\/v2\/media\/675"}],"wp:attachment":[{"href":"https:\/\/blog.asambe.ai\/index.php\/wp-json\/wp\/v2\/media?parent=676"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.asambe.ai\/index.php\/wp-json\/wp\/v2\/categories?post=676"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.asambe.ai\/index.php\/wp-json\/wp\/v2\/tags?post=676"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}