Network Sandbox Engine v2 - testing nftables rules in a real kernel environment, risk-free

Network Sandbox Engine v2 - testing nftables rules in a real kernel environment, risk-free

1 2 15
calendar_today agoschedule1 min read

I built NSE (Network Sandbox Engine) because testing nftables rules on a live system is dangerous. One bad rule can drop your SSH session or leave orphan tables behind.

NSE solves this by creating an ephemeral Linux network namespace, loading your ruleset, injecting synthetic packets, and capturing kernel verdicts via nft monitor trace. The host firewall never gets touched.

What's new in v2.0.0:

  • In-process architecture – removed the rootd socket daemon. Everything runs in a single process.
  • Pydantic core – all data models are strongly typed. The entire codebase passes mypy --strict.
  • Deterministic trace harvesting – no more hardcoded sleep delays. NSE waits for kernel traces to be ready and returns real verdicts (ACCEPT/DROP/REJECT).
  • Automated cleanup – startup sweeps orphaned namespaces. Teardown uses exponential backoff retries.
  • Gateway topologies – support for router + server namespaces to test NAT and forwarding rules.
  • MkDocs documentation with mkdocstrings for API reference.
  • import-linter enforces architectural boundaries between core and GUI.

How to use it:

  • As a Python library – import nse and write packet-level tests.
  • As a CLI for CI/CD – write YAML test definitions and run nse-runner.
  • With the web UI – FastAPI backend + Svelte frontend for real-time packet tracing and conntrack visualization.

Requirements: Linux (kernel 5.4+), Python 3.10+, nftables, iproute2, root privileges.

Links:

I'm looking for feedback. What would make this useful for your workflow? What's missing?


Tags: #nftables #linux #security #devops #opensource

Category suggestion: DevOps / SysAdmin / Security (choose the most appropriate group)

🔥 Join developers growing publicly
Share your knowledge, build in public, and grow your developer presence with a global community.

More Posts

Network Sandbox Engine v2 - testing nftables rules in a real kernel environment, risk-free

onyks - Aug 15

How I Built a React Portfolio in 7 Days That Landed ₹1.2L in Freelance Work

Dharanidharan - Feb 9

The Re-Soloing Risk: Preserving Craft in a Multi-Agent World

Tom Smithverified - Apr 14

I spent years trying to get AI agents to collaborate. Then Opus 4.6 and Codex 5.3 wrote the rules

snapsynapseverified - Apr 20

The Zero-Net-Loss Fleet & The Mercenary Squad: A Live AI Economy

DEVPlank - Aug 4
chevron_left
220 Points19 Badges
2Posts
3Comments
3Connections
https://github.com/onyks-os

Related Jobs

View all jobs →

Commenters (This Week)

4 comments
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!