Skip to content
CoRISE

From VLANs to Enforcement: Inspecting East-West Traffic

Force inter-zone traffic through enforcement. Connect NixOS and nftables to initiator policies, connection state, IPv4/IPv6 parity, denial evidence and lifecycle/HA boundaries.

T. AsanoPublished Updated 23 min read
  • Security
  • Infrastructure
  • Reliability
Open table of contents

What remains reachable after VLAN separation?

Separating user, server and management VLANs is a useful first step. But if an L3 switch provides their SVIs and freely routes between them, separating broadcast domains still leaves those systems mutually reachable.

Creating VLANs and controlling communication are different operations. The engineering question is which path packets take between zones, where a new connection is permitted, and how denials and failures become observable.

NIST SP 800-207 rejects implicit trust based solely on network location or asset ownership. [1] This article develops the boundaries in our zero-trust architecture discussion into a concrete L3/L4 example using a NixOS router and nftables.

The sample bundle includes isolated-lab VLAN configuration, an nftables table, a communication catalog, log extraction and verification/migration runbooks. It is not a complete NixOS host or HA appliance. Sample lock generation, Nix evaluation/builds, nft syntax checks or loading, Vector validation, network probes, failover and performance exercises were not executed. Addresses and expected outcomes are illustrative, not evidence of a deployed network.

1. Start with the location of the gateway

Hosts on the same VLAN normally communicate directly at Layer 2. Reaching another subnet requires a Layer 3 path. Inventory default gateways and other routes before writing filtering rules.

Here, the switch transports tagged VLANs, and a dedicated router provides every zone gateway. No alternate SVI or router forwards between these zones. Both directions pass through the same stateful enforcement point.

Scroll horizontally to view the complete diagram.

Force every inter-zone path through enforcement Users, management, backup, application and database traffic crosses the policy router. Remove alternate SVIs, NICs, VPN and failover bypasses. Same-VLAN peer traffic remains a separate Layer 2 path requiring host or distributed controls.
Fig. 01 — Force every inter-zone path through enforcement
Read the diagram as text

Users, management, backup, application and database traffic crosses the policy router. Remove alternate SVIs, NICs, VPN and failover bypasses. Same-VLAN peer traffic remains a separate Layer 2 path requiring host or distributed controls.

VLANZoneIPv4Example IPv6Responsibility
10Users10.10.10.0/24fd7a:115c:a1e0:10::/64User endpoints
20Applications10.10.20.0/24fd7a:115c:a1e0:20::/64Application services
30Databases10.10.30.0/24fd7a:115c:a1e0:30::/64Data stores
40Management10.10.40.0/24fd7a:115c:a1e0:40::/64Management jump host
50Backup10.10.50.0/24fd7a:115c:a1e0:50::/64Recovery initiator

Gateways use .1 for IPv4 and ::1 for IPv6. These are example allocations; the IPv6 hextets are hexadecimal labels. Review real addressing, overlaps, VLAN tags, access ports and native VLAN handling independently.

An L3 switch is not inherently the wrong choice. ACLs, VRFs and distributed controls can also establish boundaries. This example centralizes routing to make enforcement ownership explicit, accepting the resulting availability, capacity and latency responsibilities.

2. Record who initiates each connection

Before writing rules, specify which subject can initiate a new session to which endpoint and why. The example restricts permitted application, database, management and backup endpoints to .10 / ::10 in their respective zones.

IDInitiatorDestinationPermitted new session
NET-001Users subnetApp .10 / ::10TCP/443
NET-002App .10 / ::10DB .10 / ::10TCP/5432
NET-003Management .10 / ::10App .10 / ::10TCP/22
NET-004Management .10 / ::10DB .10 / ::10TCP/22
NET-005Backup .10 / ::10App .10 / ::10TCP/22
NET-006Backup .10 / ::10DB .10 / ::10TCP/5432

Other new inter-zone sessions are denied. Users have no direct permit to databases, management or backup. Applications have no permit to initiate connections to users. SSH to the router itself is a separate input policy restricted to the management jump host.

Permitting TCP/443 does not prove that the payload is HTTPS, that the peer is the intended application, or that an operation is authorized. The same applies to PostgreSQL on 5432 and SSH on 22. TLS, database roles, restricted SSH commands and application authorization remain separate controls.

Pull-style backup can still receive malicious responses or data from a compromised server. Restricting initiation direction does not establish backup security. Combine it with independent credentials, deletion authority and retention/restoration controls such as Object Lock.

3. Give interfaces and firewall tables explicit owners

The module is for a dedicated router. It disables the standard NixOS firewall and owns one custom inet table. It is not intended for direct import into an existing container, Kubernetes or VPN host.

{ ... }:
{
  imports = [ ./interfaces.nix ];
  # Dedicated router ownership only. Do not import on a Docker/Kubernetes/VPN host.
  networking.firewall.enable = false;
  networking.nftables = {
    enable = true;
    flushRuleset = false;
    checkRuleset = true;
    tables.segmentation = {
      family = "inet";
      content = builtins.readFile ../nft/segmentation.nft;
    };
  };
  boot.kernel.sysctl = {
    "net.ipv4.ip_forward" = 1;
    "net.ipv6.conf.all.forwarding" = 1;
  };
}
# Import only in an isolated host project that supplies hardware/boot/access configuration.
# No SSH daemon, keys, application services or fail-closed boot/stop guard is provisioned.
# The pinned nftables module deletes owned tables on service stop: forwarding can remain ON.
# Default-drop applies while chains are installed; it is not a lifecycle fail-closed guarantee.

The source baseline is nixpkgs revision b9c5e5936beac3278e275a3ee812395731c1643a. Its module supports networking.nftables.tables and build-time checkRuleset, enabled by default. [4] Reading pinned source is distinct from evaluating or building an actual host.

flushRuleset = false avoids globally deleting all tables. It does not neutralize other base chains at the same hook: an accept in one chain does not override a later chain’s drop. Evaluation order at equal priorities is not guaranteed either. Review the complete ruleset and its owners. [2]

Include the interface contract

interfaces.nix creates five VLAN devices over physical interface enp1s0. The following excerpt defines their network settings from zones.nix.

{ ... }:
let
  zones = import ./zones.nix;
  vlanName = zone: "vlan${toString zone.id}";
in {
  networking.useDHCP = false;
  networking.useNetworkd = true;
  systemd.network.enable = true;
  systemd.network.netdevs = builtins.listToAttrs (map (zone: {
    name = "20-${vlanName zone}";
    value = {
      netdevConfig = { Kind = "vlan"; Name = vlanName zone; };
      vlanConfig.Id = zone.id;
    };
  }) zones);
  systemd.network.networks = {
    "10-trunk" = {
      matchConfig.Name = "enp1s0";
      networkConfig = {
        DHCP = "no";
        LinkLocalAddressing = "no";
        IPv6AcceptRA = false;
        VLAN = map vlanName zones;
      };
    };
  } // builtins.listToAttrs (map (zone: {
    name = "20-${vlanName zone}";
    value = {
      matchConfig.Name = vlanName zone;
      address = [ "10.10.${toString zone.id}.1/24" "fd7a:115c:a1e0:${toString zone.id}::1/64" ];
      networkConfig = {
        DHCP = "no";
        IPv6AcceptRA = false;
        IPv6SendRA = false;
        LinkLocalAddressing = "ipv6";
      };
    };
  }) zones);
}
# Hosts need STATIC IPv4/IPv6 addresses and routes via their corresponding .1 / ::1.
# Switch port is tagged VLANs 10/20/30/40/50, with no untagged L3 path or alternate SVI.
# No DHCP, DNS, NTP, RA service, WAN, NAT, upstream route, HA or physical console is provisioned.

Hosts also need static IPv4/IPv6 addresses and routes. The bundle supplies no DHCP, router advertisements, DNS, NTP, WAN, NAT, HA, SSH daemon/keys or application listeners. Add necessary infrastructure dependencies explicitly to the communication catalog.

The flake exports a module, not nixosConfigurations.router, hardware definitions or boot configuration. Generate and review the lockfile in the adopting host project and build the complete configuration there.

4. Separate input, forward and output

The input hook handles packets addressed to the router; forward handles transit traffic; output handles packets generated by the router itself. [2] Permission to SSH into the router is separate from permission to SSH into an application host.

This example drops by default in input and forward, but explicitly accepts output. It therefore does not implement least-privilege router egress. Update destinations and log-forwarding endpoints need their own egress design.

Scroll horizontally to view the complete diagram.

Check the path, source, state and explicit new-session policy Input handles the router, forward handles transit and output handles router-originated packets. After source checks, forward accepts established/related traffic; new TCP SYNs need a catalog match. Other traffic reaches counters, rate-limited logging and unconditional drop. Existing tracked sessions may outlive removal of a new-session permit.
Fig. 02 — Check the path, source, state and explicit new-session policy
Read the diagram as text

Input handles the router, forward handles transit and output handles router-originated packets. After source checks, forward accepts established/related traffic; new TCP SYNs need a catalog match. Other traffic reaches counters, rate-limited logging and unconditional drop. Existing tracked sessions may outlive removal of a new-session permit.

The ingress interface is also checked against the source prefix, before established traffic is accepted. This rejects a packet arriving from Users that claims a database-zone source address.

chain ingress_guard {
  iifname != @lan_ifaces counter name bad_source drop
  meta nfproto ipv4 jump source_v4
  meta nfproto ipv6 jump source_v6
}

The corresponding source_v4 and source_v6 chains return for the interface’s permitted prefix and drop everything else. This does not prevent a host spoofing an approved peer within the same subnet. Add switch attachment controls, source guards and authenticated host/application access where appropriate. An IP address is not a workload identity.

5. Stateful permits have consequences for existing sessions

Connection tracking admits responses to a session initiated from Users to the application’s port 443. It avoids broadly opening application-to-user connections or enumerating response high ports. established and related describe Netfilter’s tracked state. [3]

The complete forward chain pairs IPv4 and IPv6 permissions and restricts addresses as well as interfaces. Each rule occupies one line. Do not casually split match expressions and an accept verdict across separate lines in an nft file.

chain forward {
  type filter hook forward priority filter; policy drop;
  ct state invalid counter name forward_denied drop
  jump ingress_guard
  oifname != @lan_ifaces counter name forward_denied drop
  ct state established,related counter name state_accepted accept
  # NET-001: HTTPS to the application endpoint.
  iifname "vlan10" oifname "vlan20" ip saddr 10.10.10.0/24 ip daddr 10.10.20.10 ct state new tcp flags & (fin|syn|rst|ack) == syn tcp dport 443 counter name NET_001 accept comment "NET-001"
  iifname "vlan10" oifname "vlan20" ip6 saddr fd7a:115c:a1e0:10::/64 ip6 daddr fd7a:115c:a1e0:20::10 ct state new tcp flags & (fin|syn|rst|ack) == syn tcp dport 443 counter name NET_001 accept comment "NET-001"
  # NET-002: Application endpoint to PostgreSQL.
  iifname "vlan20" oifname "vlan30" ip saddr 10.10.20.10 ip daddr 10.10.30.10 ct state new tcp flags & (fin|syn|rst|ack) == syn tcp dport 5432 counter name NET_002 accept comment "NET-002"
  iifname "vlan20" oifname "vlan30" ip6 saddr fd7a:115c:a1e0:20::10 ip6 daddr fd7a:115c:a1e0:30::10 ct state new tcp flags & (fin|syn|rst|ack) == syn tcp dport 5432 counter name NET_002 accept comment "NET-002"
  # NET-003: Management jump host to application SSH.
  iifname "vlan40" oifname "vlan20" ip saddr 10.10.40.10 ip daddr 10.10.20.10 ct state new tcp flags & (fin|syn|rst|ack) == syn tcp dport 22 counter name NET_003 accept comment "NET-003"
  iifname "vlan40" oifname "vlan20" ip6 saddr fd7a:115c:a1e0:40::10 ip6 daddr fd7a:115c:a1e0:20::10 ct state new tcp flags & (fin|syn|rst|ack) == syn tcp dport 22 counter name NET_003 accept comment "NET-003"
  # NET-004: Management jump host to database SSH.
  iifname "vlan40" oifname "vlan30" ip saddr 10.10.40.10 ip daddr 10.10.30.10 ct state new tcp flags & (fin|syn|rst|ack) == syn tcp dport 22 counter name NET_004 accept comment "NET-004"
  iifname "vlan40" oifname "vlan30" ip6 saddr fd7a:115c:a1e0:40::10 ip6 daddr fd7a:115c:a1e0:30::10 ct state new tcp flags & (fin|syn|rst|ack) == syn tcp dport 22 counter name NET_004 accept comment "NET-004"
  # NET-005: Backup initiator to restricted SSH endpoint.
  iifname "vlan50" oifname "vlan20" ip saddr 10.10.50.10 ip daddr 10.10.20.10 ct state new tcp flags & (fin|syn|rst|ack) == syn tcp dport 22 counter name NET_005 accept comment "NET-005"
  iifname "vlan50" oifname "vlan20" ip6 saddr fd7a:115c:a1e0:50::10 ip6 daddr fd7a:115c:a1e0:20::10 ct state new tcp flags & (fin|syn|rst|ack) == syn tcp dport 22 counter name NET_005 accept comment "NET-005"
  # NET-006: Backup initiator to restricted database role.
  iifname "vlan50" oifname "vlan30" ip saddr 10.10.50.10 ip daddr 10.10.30.10 ct state new tcp flags & (fin|syn|rst|ack) == syn tcp dport 5432 counter name NET_006 accept comment "NET-006"
  iifname "vlan50" oifname "vlan30" ip6 saddr fd7a:115c:a1e0:50::10 ip6 daddr fd7a:115c:a1e0:30::10 ct state new tcp flags & (fin|syn|rst|ack) == syn tcp dport 5432 counter name NET_006 accept comment "NET-006"
  # Rate limiting controls logging only. The final drop is unconditional.
  counter name forward_denied
  limit rate 10/second burst 20 packets log prefix "segmentation-drop: "
  drop
}

The rules combine ct state new with a TCP SYN flag condition to express the session entrance. Related traffic includes ICMP errors associated with tracked flows and matters for Path MTU Discovery. If conntrack helpers are introduced, review which related connections they add to the effective permission. This example configures none.

Removing a permit does not immediately terminate every session

Because established,related is accepted first, an already tracked session can survive removal of its new-session permit. Emergency containment may need a scoped deny before state acceptance and targeted state revocation. Flushing the entire conntrack table by default also disrupts unrelated workloads. [3][10]

The NET_001 and similar counters count packets matching the new-session rule, including retransmitted SYNs. Later established packets take a different counter. Do not interpret these values as connection counts or complete flow byte totals.

6. Limit logging without limiting denial

Logging every scanned or rejected packet can overload the kernel journal and downstream systems. Apply the rate limit to logging, with independent counting and an unconditional final drop.

# Rate limiting controls logging only. The final drop is unconditional.
counter name forward_denied
limit rate 10/second burst 20 packets log prefix "segmentation-drop: "
drop

Packets exceeding the log limit still reach drop. This is a shared rate limit, so one noisy flow can suppress useful records about another. Per-zone limits or NFLOG delivery require their own visibility and capacity design. [5]

Earlier invalid/source-check drops have separate counters and do not use this prefix. The example does not claim that one log stream records every denial reason. Kernel/journal suppression, buffering and downstream loss also remain possible.

# Read only, project kernel deny messages into a local demonstration stream.
# This does not deploy a SIEM transport, persistent queue or access-control policy.
sources:
  journal:
    type: journald
transforms:
  segmentation_denies:
    type: filter
    inputs: [journal]
    condition: |
      is_string(.message) &&
      contains(string!(.message), "segmentation-drop: ")
  project:
    type: remap
    inputs: [segmentation_denies]
    source: |
      . = { "message": .message, "timestamp": .timestamp, "source": "router-kernel" }
sinks:
  local_review:
    type: console
    inputs: [project]
    encoding:
      codec: json

The Vector example extracts messages containing the prefix and writes them to a local console. It does not complete authenticated SIEM delivery or persistent buffering. Add the separate input prefix and counter collection where required. [11]

These logs contain internal addresses and ports. Define access and retention, and make collection and forwarding responsibilities explicit. A rule comment does not automatically appear in packet logs. Auditing permits requires an explicit mapping between policy IDs and suitable log or flow records.

7. Identify traffic the central firewall never sees

Two application hosts in VLAN 20 can communicate directly through the switch. A gateway’s inet forward chain cannot control that path. Zone segmentation is not automatically workload microsegmentation.

Use host firewalls, hypervisor distributed controls, smaller subnets or NetworkPolicy where needed. nftables’ bridge family can filter packets traversing a bridge, but it does not reveal traffic completed inside a different switch. [7] Kubernetes NetworkPolicy also requires a network plugin that implements it. [12]

A SPAN or mirror feed to an IDS supports detection. A passive IDS receiving a copy normally cannot stop the original packet. Account for mirror loss, encrypted payloads and capture placement. Stateful L3/L4 enforcement, passive detection and inline IPS/application proxies have different responsibilities.

An inet table does not finish the IPv6 design

An inet table supports both families, but it does not translate ip saddr conditions into IPv6 equivalents. That is why the example pairs its address-specific rules. Conversely, indiscriminately dropping ICMPv6 can break neighbor discovery and large-packet communication. [6]

The static-IPv6 input policy rejects router advertisements and redirects while allowing scoped neighbor discovery with the required hop limit. It separately handles DAD from the unspecified address.

chain input {
  type filter hook input priority filter; policy drop;
  iifname "lo" accept
  iifname != @lan_ifaces counter name input_denied drop
  ct state invalid counter name input_denied drop
  # Static IPv6 lab: no RA service or redirect acceptance. Local NDP is not forwarding.
  meta l4proto ipv6-icmp icmpv6 type { nd-router-advert, nd-redirect } counter name input_denied drop
  ip6 saddr :: ip6 hoplimit 255 icmpv6 type nd-neighbor-solicit counter accept
  ip6 saddr fe80::/10 ip6 hoplimit 255 icmpv6 type { nd-neighbor-solicit, nd-neighbor-advert } counter accept
  jump ingress_guard
  ip6 hoplimit 255 icmpv6 type { nd-neighbor-solicit, nd-neighbor-advert } counter accept
  ct state established,related counter accept
  iifname "vlan40" ip saddr 10.10.40.10 ip daddr 10.10.40.1 ct state new tcp flags & (fin|syn|rst|ack) == syn tcp dport 22 counter accept comment "ROUTER-SSH-v4"
  iifname "vlan40" ip6 saddr fd7a:115c:a1e0:40::10 ip6 daddr fd7a:115c:a1e0:40::1 ct state new tcp flags & (fin|syn|rst|ack) == syn tcp dport 22 counter accept comment "ROUTER-SSH-v6"
  iifname "vlan40" ip saddr 10.10.40.10 icmp type echo-request counter accept
  iifname "vlan40" ip6 saddr fd7a:115c:a1e0:40::10 icmpv6 type echo-request counter accept
  counter name input_denied
  limit rate 10/second burst 20 packets log prefix "segmentation-input-drop: "
  drop
}

This is not a complete SLAAC/DHCPv6 network. Switch and host controls still need to address rogue advertisements and on-link neighbor discovery. Verify DAD, ND and Path MTU Discovery—including Packet Too Big—as well as basic dual-stack connectivity.

8. Do not count a timeout as a passing negative test

First use a test host in the actual Users VLAN to reach the permitted application endpoint. Preserve the intended host name, SNI and CA trust, and verify the expected response body.

curl --fail --connect-timeout 3 --max-time 10 --cacert lab-ca.pem \
  --resolve app.lab.example:443:10.10.20.10 https://app.lab.example/health
curl --fail --connect-timeout 3 --max-time 10 --cacert lab-ca.pem \
  --resolve 'app.lab.example:443:[fd7a:115c:a1e0:20::10]' https://app.lab.example/health

Then attempt a new user-to-database connection.

nc -4 -vz -w 3 10.10.30.10 5432
nc -6 -vz -w 3 fd7a:115c:a1e0:30::10 5432

A failed nc command is not enough to prove firewall enforcement. The service may be stopped, the route missing, the source interface wrong or the command itself unavailable.

Scroll horizontally to view the complete diagram.

Distinguish policy denial from a failed connection attempt First establish listener health and an authorized control path. Correlate the negative attempt with source, time, five-tuple, ingress, absence of egress and a counter or trace. Timeout alone is inconclusive. Repeat for both families, replies versus reverse initiation, bypass and revocation.
Fig. 03 — Distinguish policy denial from a failed connection attempt
Read the diagram as text

First establish listener health and an authorized control path. Correlate the negative attempt with source, time, five-tuple, ingress, absence of egress and a counter or trace. Timeout alone is inconclusive. Repeat for both families, replies versus reverse initiation, bypass and revocation.

Distinguish SUCCESS, POLICY_DENIED and INCONCLUSIVE. Verify the destination listener locally and from an authorized control source before and after the negative attempt. Correlate time and five-tuple with ingress arrival, absence of forwarding on egress and the appropriate drop counter or trace. A broad counter increasing under background traffic does not attribute a single probe; use an isolated fixture or narrowly scoped packet trace.

BoundaryEvidence needed
Permitted new sessionIntended source reaches the expected service, with identity and response checks
Denied new sessionKnown-live listener and route, with correlated policy denial
Replies versus reverse initiationReplies succeed; prohibited reverse new sessions fail
IPv4 / IPv6Repeat the matrix for both; inspect ND and PMTU
Existing stateObserve sessions after permit removal and test explicit revocation
Bypass routesInspect SVIs, VRFs, VPNs, secondary NICs, overlays, failover and same-L2 paths

The runbook also covers unlisted application hosts, management/backup exposure and forged source prefixes. Do not open test services on operational BMCs or backup systems without scope; use designated equivalent isolated fixtures.

9. Review observed dependencies before migration

Moving an existing network straight to default deny can stop undocumented dependencies. Observe source, destination and protocol/port over business, backup, batch and failover cycles, then map flows to service owners and purposes.

Observed traffic is not automatic approval. A user-to-database connection might be necessary work, a legacy dependency to replace or suspicious activity. The decision requires context.

The sample policy.csv records rule IDs, both address families, ports, owner roles, reasons and review dates. Owners and dates are illustrative, not approved organizational assignments. The catalog and rules are reviewed together; the bundle does not implement a policy compiler.

The following displays the fields of the NET-001 CSV entry as JSON.

{
  "id": "NET-001",
  "ingress": "vlan10",
  "egress": "vlan20",
  "source_ipv4": "10.10.10.0/24",
  "source_ipv6": "fd7a:115c:a1e0:10::/64",
  "destination_ipv4": "10.10.20.10",
  "destination_ipv6": "fd7a:115c:a1e0:20::10",
  "protocol": "tcp",
  "port": "443",
  "owner_role_example": "application-owner",
  "reason": "HTTPS to the application endpoint",
  "review_date_example": "2026-11-01"
}

If policy later moves into typed Nix options or a schema-driven generator, validate required fields, protocol/port combinations, address families, duplicate IDs, expiry and unexpected zones. Compare expiry against an explicit CI review date rather than an implicit evaluation clock. Temporary exceptions need owners, reasons, deadlines and removal conditions.

Example syntax and build checks apply to the completed host project and an isolated Linux environment:

nix flake check
nix build '.#nixosConfigurations.router.config.system.build.toplevel'


# In the isolated Linux environment, from the sample bundle root:
nft --check --file nft/check.nft

nix flake check covers the checks actually defined. nft --check does not establish real paths or application authorization. Because the bundle has no host output, the host build command only applies after integration into an adopting project.

10. Inspect paths and state separately during failure

A stateful firewall needs both directions to reach compatible tracking state. With PBR, ECMP or multiple routers, inspect asymmetric paths, reverse-path filtering, VIP changes and failure bypasses. This example disables the standard firewall, so it does not assume that module’s reverse-path setting still provides protection. Inspect effective kernel rp_filter and nft FIB conditions.

Moving a VIP does not automatically transfer conntrack state. Stateful HA requires a synchronization design, compatible timeouts/helpers and NAT handling where applicable, plus split-brain prevention and fencing. If sessions reset and applications reconnect, explicitly agree that failure model. The sample provides no HA mechanism. [10]

Scroll horizontally to view the complete diagram.

Manage configuration, connection state, routing and lifecycle separately Nix generations and rules describe configuration. Conntrack retains sessions, while peers and switches hold routes. Stopping nftables can delete tables while forwarding remains enabled. VIP failover is not state synchronization. Verify external guards and management access during start, stop, failure and recovery.
Fig. 04 — Manage configuration, connection state, routing and lifecycle separately
Read the diagram as text

Nix generations and rules describe configuration. Conntrack retains sessions, while peers and switches hold routes. Stopping nftables can delete tables while forwarding remains enabled. VIP failover is not state synchronization. Verify external guards and management access during start, stop, failure and recovery.

The pinned NixOS module removes its managed tables when the service stops. Forwarding sysctls can remain enabled, leaving no corresponding filter. [4] Default drop while chains exist does not guarantee fail-closed behavior during stop, boot or failure. Design independent external controls, link/routing gates and lifecycle ordering where required, then exercise them in isolation.

Selecting an earlier NixOS generation does not automatically rewind conntrack, peer routes, switch configuration or existing sessions. Separate configuration from runtime state. Restoring an old SVI can also restore the earlier broad reachability. Establish console or out-of-band access and stop conditions before migration.

11. Operate the policy with performance and telemetry evidence

After centralizing routing, measure packet rate, throughput, connection setup, concurrent state, conntrack occupancy, latency, packet sizes and log loss. Small packets or many database sessions can exhaust CPU before headline bandwidth. This article supplies no measured capacity or recovery-time claim.

Flowtables and hardware offload can improve performance, but established flows bypass part of the ordinary forwarding path. Existing counters and logging may no longer observe what they did before. Revalidate policy changes and state invalidation as well as throughput. [9] Offload is not enabled in this example.

Review deny trends, expired exceptions, unused rules and new dependencies regularly. Table recreation can reset counters: zero now does not mean unused for 90 days. Distinguish seasonal/disaster-recovery use from genuine inactivity and from broken collection. Give emergency runtime changes a reason and deadline, then reconcile them into Git.

In the prevent, detect, contain and recover model, segmentation strengthens containment after compromise. It does not eliminate abuse of permitted HTTPS or a compromised application. Add service identity and operation-level authorization. NIST SP 800-207A develops identity-based application/service policy alongside network parameters. [8]

The related infrastructure case provides the context of internal communication and recovery redesign. It does not claim that these addresses, nftables rules, routers, exercises or performance values were implemented or measured in that engagement.

Use VLANs to define zones, routes to force enforcement, explicit rules to constrain new sessions, and telemetry to observe packets and failures. Account for same-L2 paths, IPv6, existing state and failure bypasses. Being able to explain what remains reachable is the engineering step beyond VLAN separation.

References

  1. NIST SP 800-207 — Network location and implicit trust.
  2. nftables: Configuring chains — Hooks, priorities and accept/drop evaluation.
  3. nftables: Connection tracking — State and counter semantics; also nft manual.
  4. Pinned NixOS nftables module — Table ownership, syntax checking, stop and reload; also standard firewall.
  5. nftables: Logging traffic — Non-terminating log statements; also rate limiting.
  6. RFC 4890: Filtering ICMPv6 — ND, errors and required ICMPv6; also router example.
  7. nftables: Bridge filtering — Filtering traffic that actually traverses the bridge.
  8. NIST SP 800-207A — Application/service identity policy.
  9. Linux kernel: Netfilter flowtable — Fast paths, counters and hardware offload.
  10. Conntrack tools manual — State management and HA synchronization.
  11. Vector Journald source — Journal input and collection requirements.
  12. Kubernetes NetworkPolicy — Requires enforcement by a supporting network plugin.

NixOS behavior refers to the pinned module revision above. Configuration, figures, policy entries and procedures are authored examples, not execution results or adopted customer topology.

T. Asano

More articles by T. Asano

Contact

Tell us about your engineering challenge.

Talk with CoRISE about the design, implementation and operation of your systems.

Start a Conversation