HelixML
Open Helix Cyber
Open Helix Cyber

Network Blocking

Ingress & Egress Blocking with Active Connection Disruption

Stop new unauthorized connections at the Linux kernel and immediately sever established attacker TCP tunnels across host, Docker, and Kubernetes network namespaces using eBPF, atomic nftables, and multi-namespace SOCK_DESTROY.

eBPF + SOCK_DESTROY

New connections + established TCP tunnels

Live-verified on standalone Linux hosts, Docker bridge containers, and HA Kubernetes clusters running strict outbound.default=drop.

Short answer

Blocking an IP in a standard firewall only stops new handshakes — an attacker who already opened a reverse shell or exfiltration tunnel keeps transferring data through ct state established,related accept. Helix Cyber Defence enforces deny rules before established-connection accepts and runs multi-namespace SOCK_DESTROY across the host and every container/pod to terminate active TCP tunnels immediately.

Two-layer disruption pipeline

When you push an enforced shirudo.firewall or shirudo.sandbox policy from the Helix portal, cyberd executes two coordinated layers in the Linux kernel:

New Connection Blocking + Active Tunnel Teardown

TRACK 1 — BLOCK NEW INGRESS & EGRESS CONNECTIONSeBPF cgroup/connect4|6EPERM before SYN (+ ::ffff:x.x.x.x)eBPF skb & tc_ingressHTTP path shields + L3/L4 dropnftables (atomic commit)ff_input · ff_output · ff_forwardTRACK 2 — SEVER ALREADY-ESTABLISHED TUNNELS (REVERSE SHELLS / EXFIL)1. Pre-Established Packet DropEnforced deny runs BEFORE ct state established acceptDrops reply packets in ff_input & both dirs in ff_forward2. Multi-Netns NETLINK_SOCK_DIAG SOCK_DESTROYSweeps host netns + /host/proc/<pid>/ns/net (4 workers)Kills live TCP sockets immediately with ECONNABORTED / RST

Packet path & rule ordering

cyberd owns a dedicated atomic table (table inet helix_cyberd) with three filter chains so it never clashes with Docker, Kubernetes kube-proxy, or CNI rules:

  • ff_output (host egress): Preserves lifelines first, then evaluates enforced outbound.deny and outbound.deny_to rules ahead of established-state acceptance. When outbound.default is set to drop, the established rule is restricted to ct direction reply so locally initiated outbound tunnels cannot ride an existing conntrack entry past the default drop.
  • ff_input (host ingress): Drops ct direction reply packets returning from denied outbound destinations first, preserves reply packets of allowed outbound connections (ct state established,related ct direction reply accept), and then evaluates inbound.deny_from, inbound.allow, and inbound.deny ahead of any blanket established-state accept (which is omitted under inbound.default: "drop") — so unauthorized SSH and other unallowed inbound sessions stop immediately while allowed IP sessions stay connected.
  • ff_forward (routed containers & pods): Applies enforced egress and ingress denies in both directions (matching destination IP/port and reply source IP/port) before established acceptance, covering routed Docker bridges and Kubernetes pod CIDR traffic.

Multi-namespace SOCK_DESTROY

Dropping packets stops data movement, but an active socket can linger in ESTABLISHED until TCP retransmission timeouts expire. Immediately after committing an enforced policy, cyberd invokes Linux NETLINK_SOCK_DIAG SOCK_DESTROY across every unique network namespace on the machine:

  1. Host network namespace: Queries AF_INET and AF_INET6 (including IPv4-mapped ::ffff:x.x.x.x) TCP sockets and destroys every socket matching denied outbound destinations, denied inbound sources, or non-allowlisted peers under default=drop.
  2. Container & pod network namespaces: Scans /host/proc/<pid>/ns/net, deduplicates namespaces by inode, and runs 4 parallel workers that switch into each namespace to execute SOCK_DESTROY against matching container and pod sockets.
  3. Lifeline exclusion: Loopback, SSH (unless restricted), the Helix Portal control plane, and Kubernetes control-plane ports are never destroyed.

Coverage & honest boundaries

Kernel networking has specific boundaries depending on protocol and Layer 2 vs Layer 3 routing. Here is exactly how each traffic path is handled:

Traffic pathNew connectionsExisting established flows
Host egress & ingress (TCP)Blocked by eBPF cgroup/connect4|6 and nftables (ff_output / ff_input).Pre-established packet drop + immediate SOCK_DESTROY socket teardown.
Host & routed container/pod (UDP)Blocked by eBPF cgroup/connect4|6 (connected UDP) and nftables.Disrupted on the very next packet by pre-established nftables drop (SOCK_DESTROY is TCP only).
Routed Docker / Kubernetes pods (TCP)Blocked by eBPF cgroup hooks + ff_forward.Bidirectional ff_forward drop + multi-netns SOCK_DESTROY across /host/proc.
Same-bridge L2 container-to-container (TCP)Blocked at socket connect by eBPF cgroup/connect4|6 (host L2 bridge switching bypasses ff_forward unless br_netfilter is enabled).Existing TCP tunnels severed immediately by multi-netns SOCK_DESTROY inside the container namespaces.
HTTP exploit paths (L7)Blocked on ingress via cgroup_skb/ingress shirudo.shield HTTP path rules without a sidecar proxy.Matching requests are dropped at the socket buffer layer immediately upon policy load.

Simulate to enforce workflow

You never have to guess whether an egress block or default-drop policy will affect a legitimate dependency:

  1. Deploy in Observe mode: Set "mode": "observe" on shirudo.firewall. eBPF and NFLOG log every matching connection and increment Simulated & watched counters without dropping packets.
  2. Inspect metrics & topology: Review simulated hits in the Impact dashboard and verify allowlisted peers on the live traffic topology.
  3. Flip to Enforce: Switch to "mode": "enforce". cyberd commits the atomic nftables transaction, enables eBPF drops, tears down matching TCP sockets via SOCK_DESTROY, and monitors the 90-second rollback window.

Ready to configure rules? Read the full JSON schema and examples in Configure Blocking & Policies.

Frequently asked questions

Why do traditional host firewalls fail to stop an active exfiltration tunnel?

Most nftables and iptables rulesets put ct state established,related accept near the top of INPUT, OUTPUT, and FORWARD chains. Once an attacker opens a reverse shell, SSH tunnel, or C2 TCP stream, adding a new IP block only stops future handshakes while the existing tunnel keeps moving data indefinitely. Helix Cyber Defence evaluates enforced deny rules before established accepts and actively tears down matching TCP sockets with SOCK_DESTROY.

Does SOCK_DESTROY work for Docker containers and Kubernetes pods?

Yes. When cyberd runs with /host/proc mounted, it enumerates every unique network namespace across host processes, Docker containers, and Kubernetes pods and runs NETLINK_SOCK_DIAG SOCK_DESTROY inside each namespace in parallel. Established TCP tunnels inside containers or pods are severed immediately, even when they sit on the same Linux bridge.

How are existing UDP flows handled when a rule is enforced?

cyberd's SOCK_DESTROY teardown sweep targets TCP sockets. Existing stateless UDP flows are disrupted by the atomic nftables rules in ff_output, ff_input, and ff_forward, which drop matching packets before any established-state accept so traffic stops on the very next packet.

What happens to same-bridge container-to-container traffic?

Packets switched at Layer 2 on the same host bridge do not traverse the host nftables FORWARD hook unless br_netfilter routes bridge frames through netfilter. Even on a plain L2 bridge, however, cyberd still immediately severs existing same-bridge TCP tunnels via multi-namespace SOCK_DESTROY and blocks new TCP/UDP connects via eBPF cgroup/connect4 and cgroup/connect6.

Can I block all inbound traffic except SSH from my own IP address?

Yes. Use the SSH-only lockdown preset (inbound.default=drop with an inbound.allow rule for TCP/22 from your IP/CIDR and allow_restricted_ssh=true), or the SSH allowlist preset if you only want to restrict SSH while leaving other services open. The portal auto-detects your current IP for one-click insertion, and cyberd immediately terminates pre-existing unauthorized inbound sessions while keeping your allowed IP's SSH session, outbound replies, loopback, and Kubernetes lifelines alive.

Will enabling outbound.default=drop break Kubernetes clusters or DNS?

No. Under outbound.default=drop, cyberd preserves loopback, SSH (unless explicitly disabled), the Helix Portal endpoint, HA Kubernetes control-plane TCP ports (2379, 2380, 6443, 10250), CNI overlay UDP ports (8472, 51820, 51821), and post-deny DNS on port 53 so cluster networking stays healthy while unauthorized outbound traffic is dropped. Every enforced policy is also guarded by a 90-second automatic rollback.

Helix Cyber Defence

Stop new connections and sever active attacker tunnels in seconds.

Deploy cyberd, validate deny rules in Observe mode against real traffic, and enforce atomic kernel blocking with automatic rollback.