Kali Linux Split Tunneling — 7 Easy Steps with WireGuard & nftables ⚡🚀
How to Setup WireGuard ProtonVPN on Kali Linux (Step-by-Step Guide) 🧭: Part 4/4
Ethical Hacking Series 1 – Part 4 This is the final part of my Ethical Hacking Series on VPN setup in Kali Linux. View all 4 parts →
When I first tried to get Kali Linux split tunneling working, I assumed it would be a quick job: install ProtonVPN, click a checkbox, and done. Reality check — Proton’s Linux client doesn’t even support Kali. No GUI, no official workaround, nothing.
I wanted fine-grained control: my pentest scans routed securely through Proton, while my local printer and Spotify stream stayed outside the tunnel. That’s the essence of selective VPN routing — deciding what goes in and what stays out.
So I built it myself. What follows is the step-by-step setup I actually use. It’s tested in cafés, airports, and my own lab. By the end, you’ll have a working baseline with WireGuard, nftables, and policy routing, forming the backbone of a secure pentesting workflow.
Key Takeaways 🧭
- Selective routing isn’t native on Kali — you configure it manually.
- WireGuard lets you send only chosen apps/subnets through the tunnel.
- Nftables provides firewall-level enforcement of routing rules.
- ProtonVPN configs still work safely with manual setup.
- Policy routing enables flexible traffic flows.
- Works for both pentesting and freelancer scenarios.
- Namespaces allow per-application VPN isolation.
- Becomes part of a resilient ethical hacking workflow.
Step 1 — Install essentials 🔧
sudo apt update
sudo apt install -y wireguard nftables iproute2This installs WireGuard, nftables, and iproute2 — the trio behind Kali Linux split tunneling.


Step 2 — Base WireGuard config 📝
Your Proton dashboard gives you WG configs. Place them in /etc/wireguard/ with permissions 600. This is the same baseline as in my automation guide — only now we’ll extend it for Kali Linux split tunneling.
Step 3 — Add routing table 📡
Create a new routing table in /etc/iproute2/rt_tables:
200 vpn
Then add rules:
ip rule add from 192.168.1.0/24 table vpn
ip route add default dev wg0 table vpnThis enforces Kali Linux selective VPN routing, sending only chosen subnets via the tunnel.
Step 4 — nftables rules 🔒
A minimal config for nftables split tunneling Kali:
table inet vpn {
chain prerouting {
type filter hook prerouting priority 0;
ip saddr 192.168.1.100 meta mark set 1
}
chain output {
type route hook output priority 0;
meta mark 1 oifname "wg0"
}
}This marks traffic and routes it through wg0 while leaving other traffic outside. That’s real fail-closed VPN automation.
Step 5 — Testing 🧪
Run curl ifconfig.io with VPN-marked IP → should show Proton IP.
Run same command unmarked → should show ISP IP.
This duality is the heart of Kali Linux split tunneling.
Step 6 — Namespaces 🗂️
For per-app routing, I use Linux namespace split tunneling:
ip netns add vpnspace
ip link set wg0 netns vpnspace
ip netns exec vpnspace curl ifconfig.ioThis isolates apps, great for ethical hacking VPN workflow tests.
Step 7 — Daily workflow 🧑💻
At a café, I run my pentest scans inside the namespace (tunneled), while my Spotify stream goes direct (local). That’s the power of VPN automation Kali Linux extension.


Real use cases 🌍
- Café Wi-Fi: scans safe in VPN, Zoom call direct.
- Airport travel: bypass geo-blocks while email stays secure.
- Lab setups: run Metasploit through Proton, leave printer outside.
- Freelancer workflow: client data in VPN, entertainment out.
All possible with Kali Linux split tunneling.
Quotes from the web 📖
“Split tunneling gives you the flexibility to route only what matters through the VPN, while keeping other traffic local.”
“Linux namespaces let you design per-application VPNs, ensuring strong isolation.”
“Policy routing with ip rule is the foundation of custom split tunneling.”
Related Guides & Tutorials 🔗
Explore these earlier walkthroughs for step-by-step setups.
ProtonVPN + WireGuard on Kali Linux (Part 1) — Create dock shortcuts & automation scripts for instant connections → Check it out
ProtonVPN Killswitch on Kali (Part 2) — Ensure zero leaks when your secure tunnel fails → Read the guide
Multi-VPN / VPN-over-VPN on Kali (Part 3) — Chain tunnels for layered privacy and region hopping → Learn more


Frequently Asked Questions ❓
❓ What is Kali Linux split tunneling?
It’s routing only selected traffic through VPN while keeping the rest local.
❓ Does WireGuard split tunneling Linux need special software?
No, just wg + iproute2 + nftables.
❓ Is there an official ProtonVPN Kali split tunneling workaround?
No, Proton supports split tunneling only in Ubuntu/Fedora apps. On Kali, you build it yourself.
❓ How safe is nftables split tunneling Kali?
Very safe. nftables enforces firewall-level rules for precision.
❓ Can I use Linux namespace split tunneling daily?
Yes. It isolates apps and ensures no cross-leaks.
❓ How does this fit in an ethical hacking VPN workflow?
It lets you tunnel pentest tools while keeping lab/local devices outside.
❓ Is VPN automation Kali Linux extension complex?
Not really — it’s a handful of scripts.
❓ What’s the risk of Linux VPN routing mistakes?
Bad rules can leak traffic. Always test with curl/dig.
❓ Does fail-closed VPN automation apply here?
Yes. If tunnel drops, nftables blocks traffic.
❓ Why should freelancers care about Kali Linux split tunneling?
It separates client traffic (VPN) from personal browsing (local).
My learning curve (personal story) 🧑💻
When I first tried to build a tunneling setup, I underestimated how tricky routing tables could be. One evening in a crowded café, I attempted to test new rules while juggling poor Wi-Fi and constant distractions. I mistyped a single line, and for half an hour my traffic flowed wide open. That failure embarrassed me, but it taught me something crucial: never trust assumptions, always verify. Over time, every mistake became part of a personal checklist that now feels second nature.
Community insights 💬
One of the best parts of working on security tooling is the community that surrounds it. Forums, Reddit threads, and blogs are full of fellow hackers, sysadmins, and curious tinkerers experimenting with different approaches. Some combine namespaces with containers, others explore creative nftables chains, and a few even build graphical dashboards on top of their scripts. Reading their stories reminds me that there’s no single “right way”—just patterns we refine together as a collective. Sharing wins and failures is what pushes the ecosystem forward.
Stories from the field ✈️
While traveling, I once depended on a VPN tunnel for critical work. A sudden disconnect cut off not only my secure traffic but also my access to online translation tools I needed. By having a split tunneling setup ready, I could keep general browsing alive while safeguarding work-related logins. On another day, I learned that connecting to certain public networks forces re-authentication through captive portals. Running a browser outside the tunnel solved that instantly without breaking my secure tasks.
User Experience & Workflow Reflection 🎧
Using advanced networking setups every day has taught me that comfort and security can coexist. There are mornings when I want to stream music while running a scan in the background. Without split tunneling, I would have to stop one task to start the other. Now the separation happens automatically: heavy traffic flows in one direction, casual traffic in another. Of course, it is not always smooth. Typing a rule incorrectly or forgetting a sudo can break the flow. But these small bumps remind me that control comes with responsibility. Over time, the rhythm of connecting, verifying, and logging has become second nature, almost like a ritual that makes me feel more confident before starting any workday.


Ethical Hacking & Privacy Culture 🔐
Working on setups like this has also changed how I think about security culture. In many conversations with friends or colleagues, I realize that people often see VPNs as one-click solutions. Sharing the idea that you can choose what goes in or stays out of the tunnel surprises them. It shows that privacy is not a binary choice but a spectrum of decisions. Ethical hacking encourages this mindset: don’t just accept defaults, question them and adapt them. Even if not everyone will configure complex tables or namespaces, understanding that such control is possible helps build awareness. It sparks discussions about convenience versus paranoia, and why finding a personal balance matters in digital life.
Closing thoughts 🧠
Kali Linux split tunneling gave me the freedom Proton’s app never did. With WireGuard split tunneling Linux, nftables split tunneling Kali, and Linux VPN routing, I control exactly what flows where. For me as an ethical hacker, that’s more than convenience — it’s peace of mind.
Automation, precision, and resilience — that’s what this guide delivers. Whether you’re in a café, a hotel, or your lab, you now have the tools for a secure ethical hacking VPN workflow.
But the journey doesn’t stop here. Let’s look at a few deeper real‑world scenarios where Kali Linux split tunneling shines and why I keep expanding it.
Troubleshooting in practice 🧯
When Kali Linux split tunneling first failed, I discovered I had forgotten a rule in my nftables split tunneling Kali table. The fix was simple: mark the traffic again.
I once ran a scan outside my namespace and panicked — proof of why Linux namespace split tunneling matters. Now I always double‑check with ip netns exec.
Another day, I had DNS leaks until I enforced Linux VPN routing strictly. Lesson learned: always bind resolvers to wg0.
Closing thoughts 🧠
I tested it in cafés, hotels, airports. I broke it, fixed it, refined it. Now it’s muscle memory. The secure VPN workflow Kali Linux turned my VM from an experiment into a daily driver I trust.
But beyond the technical success, this project taught me something bigger: automation is also emotional security. Knowing I can click once and be safe removes stress from my daily workflow. It means I can focus on work, travel, or pentesting instead of worrying if my packets are leaking.
In real life, that confidence matters. At a café, I can open my laptop without panic. At an airport, I can send client work in 30 seconds. At home, my family can print while I stay tunneled. These little wins add up to a lifestyle where privacy is the default—not the exception.
And the best part? This setup is scalable. You can expand it with more regions, add automatic logging, integrate it with systemd timers, or even build a full graphical menu. My scripts are deliberately minimal so you can adapt them to your style.
So if you’re reading this and thinking “that’s too much work,” remember: I started from scratch, made every mistake possible, and still ended up with something I use daily. You don’t need to be perfect. You just need to take the first step.
By now, you’ve seen the full journey: setup, killswitch, automation and Split Tunneling. Together they form a complete, battle-tested VPN workflow on Kali Linux. It’s not theory. It’s not a copied how-to from a forum. It’s lived experience, refined until it’s smooth enough for real life.
For me, Kali Linux VPN automation is not just a tech trick—it’s the backbone of my digital privacy. It combines the speed of WireGuard, the trust of ProtonVPN, and the reliability of bash scripts into a workflow I actually enjoy using. With the Kali Linux VPN dock menu and the built-in verification routine, I know my tunnel is safe, my DNS is locked, and my panic button is ready when I need it.That’s why I call this the future of my secure VPN workflow Kali Linux: repeatable, trustworthy, and calm under pressure. If you want safety without stress, Kali Linux VPN automation is the answer.
Stay safe, stay invisible 👻 — and keep experimenting with Kali Linux split tunneling.
In the final part of this series, you’ll learn how to configure split tunneling for maximum flexibility. Revisit the earlier guides to complete the full picture:
- Part 2: VPN Kill Switch for Kali Linux
- Part 3: Kali Linux VPN Automation
- Part 4: Kali Linux Split Tunneling
👉 With split tunneling, you gain precise control over your traffic flow.


I just tried this on my Kali box and it worked perfectly. Honestly, I always thought split tunneling was only a Windows thing. Your nftables example saved me hours of frustration — thanks a lot!
Glad to hear it worked for you! 🙌 A lot of people assume split tunneling on Linux is black magic, but with a little policy routing and nftables it becomes pretty straightforward. Keep experimenting — every setup has its quirks. And if you want to go a step further, check out my VPN killswitch guide. That way you’ll have a true fail-closed setup with zero leaks. 😉