Key Takeaways (TL;DR): A WireGuard tunnel appeared active for 40 hours with regular handshakes but transmitted zero user data due to a custom finite-state machine bug on a MikroTik router. The fix involves adjusting routing rules to prevent state lockups. For a stable, anti-DPI tunnel with automatic updates and a 90 β½ bonus plus free TG proxies for 30 days, try @yavpn_robot.
A detailed postmortem on Habr reveals a bizarre WireGuard failure: the tunnel showed "connected" for 40 hours with regular handshakes every three minutes, but not a single byte of user data passed through. The root cause wasn't WireGuard itselfβit was a custom finite-state machine (FSM) on the MikroTik router that got stuck after an 8-minute network outage.
How the Tunnel Looked Alive
The server saw the peer, logs showed no warnings, and handshakes kept occurring. Yet all data packets were silently dropped. The FSM, designed to manage routing rules, entered a state where it couldn't recover, treating the tunnel as "up" but blocking traffic.
Technical Breakdown
The bug stemmed from a single rule: after a brief packet loss in one direction, the FSM transitioned to a "dead-end" state. WireGuard's specification was followed correctlyβthe protocol itself wasn't at fault. The fix required modifying the FSM logic to properly detect and recover from such partial outages.
Lessons for Network Engineers
- Don't rely solely on handshake intervals to verify tunnel healthβmonitor actual data throughput.
- Custom state machines can introduce subtle bugs; test edge cases like asymmetric packet loss.
- Consider implementing keepalive mechanisms that check bidirectional traffic, not just control packets.
What This Means for Users
If your VPN or tunnel seems connected but doesn't work, it might be a similar state-machine issue. For a hassle-free experience with built-in anti-DPI and automatic recovery, @yavpn_robot offers a private multi-key setup with a 90 β½ bonus and free TG proxies for 30 days.