Full Network Encryption with Surfshark WireGuard VPN on MikroTik RB4011
Overview
To enhance privacy and security across my entire home network (only, not at work), I deployed Surfshark VPN at the gateway level on Mikrotik RB4011, ensuring all devices connected to my infrastructure browse the web through an encrypted tunnel. This setup provides consistent protection for every device—PCs, smartphones, IoT devices, and VMs—without requiring individual VPN clients.
Infrastructure Context
My home lab network is built around the MikroTik RB4011 router, which manages multiple subnets:
- Admin : Management devices and servers (Proxmox, NAS, Docker services).
- Smart Devices : IoT and automation systems.
- Guest : Isolated wireless clients.
The router also participates in a ZeroTier site-to-site VPN connecting my Home Site and Work Site, allowing centralized management and resource sharing between locations.
Implementation Steps
- Surfshark Credentials
I generated and downloaded WireGuard configuration files (public/private keys and server endpoint) from my Surfshark account dashboard. - WireGuard Interface Setup (full details)
On the RB4011, I created a new WireGuard interface (surfshark), imported the keys, and defined the Surfshark server as a peer. - Routing Configuration
I set the default route (0.0.0.0/0) to pass through the surfshark interface.
Using mangle rules, I marked all outbound traffic with a VPN routing mark to ensure that every packet exiting the LAN traverses the encrypted tunnel. - DNS & AdGuard Integration
Local DNS resolution and filtering remain handled by AdGuard Home, running in my Proxmox environment.
This preserves ad-blocking, parental controls, and DNS privacy even when browsing through Surfshark. - Testing & Validation
I verified encryption and routing integrity via:- IP leak and DNS leak tests.
- Bandwidth and latency checks.
- External IP verification confirming Surfshark’s exit node.
Key Features
- Full-Tunnel VPN: All outbound traffic from Admin only subnet is encrypted via WireGuard.
- Centralized Privacy: Only one router manages the VPN, protecting every connected device.
- ZeroTier Integration: Remote site traffic is also routed securely through the home VPN gateway.
- DNS Continuity: AdGuard Home remains operational, preventing DNS leaks and maintaining filtering rules.
- Performance Efficiency: The RB4011’s strong CPU and hardware offloading ensure stable, high-speed VPN throughput.
Results
By centralizing the Surfshark WireGuard connection on the MikroTik RB4011, my entire Admin network gained:
- Consistent encryption across all devices.
- Masked public IP for enhanced anonymity.
- Simplified VPN management through a single router-based configuration.
- Unified security posture
All devices — from laptops, Dektops, smartphones and servers — now browse securely without any local VPN setup.
Conclusion
This project demonstrates how a single, well-configured MikroTik router can provide enterprise-grade network privacy for an infrastructure.
By integrating Surfshark WireGuard at the gateway level, I achieved seamless, full-network encryption, unified DNS filtering, and total control over outbound connectivity — all through an elegant, router-centric design.