Cilium HostFirewall guards node traffic, but it is disabled by default
Cilium's host firewall extends network policy to the Kubernetes node itself. The Cilium Helm reference lists hostFirewall.enabled with a default of false. When it is not enabled, policies aimed at the host endpoint do not provide the node-level enforcement that an operator may expect. A cluster can have detailed pod policies and still allow broad node traffic between hosts, management networks, and workload networks.
Host policies use a CiliumClusterwideNetworkPolicy with a node selector instead of an endpoint selector. The Cilium documentation describes the host firewall as a way to enforce security policies for Kubernetes nodes. Host endpoints are represented explicitly, and the policy applies to the host traffic path rather than only to pod interfaces.
Inventory the node boundary
Start with the node interfaces and the services that must remain reachable. A Kubernetes node normally needs API server access, etcd access on control-plane nodes, kubelet and health checks, overlay or native routing traffic, DNS, monitoring, and administrative access. Node-to-node traffic may include storage, backup, and cluster services. List those dependencies before writing a deny rule.
Enable the host firewall in a test cluster or a small node pool. The Helm value is not enough to prove the policy works. Check the Cilium status and host endpoint state, then confirm the interfaces on which enforcement is active. If the deployment auto-detects interfaces, verify the detected set against the node's actual network layout.
HostNetwork pods are a special case. Cilium's troubleshooting guidance notes that these pods can have full network connectivity without Cilium security policy by default and recommends host policies when policy must apply. Inventory hostNetwork workloads and decide whether they should exist, whether they can use pod networking, and which host policies cover their traffic.
Roll out with a controlled audit
Cilium supports policy audit mode for the host endpoint. Audit mode converts drops into observations, which helps identify missing rules before enforcement. The documentation also warns that audit mode does not enforce network policy and is not recommended for production. It does not persist across a Cilium agent restart; an existing policy becomes enforcing when the agent restarts.
Use audit mode as a bounded migration step. Capture traffic, build rules for the legitimate dependencies, review the result, and then enforce. Do not leave a host endpoint in audit mode indefinitely and describe the cluster as protected. Check the configuration state after every agent restart and rollout.
The first host policy enforcement can drop reply traffic for legitimate connections that the policy should allow. Cilium documents this as a known issue and says connections should stabilize, with an enable, disable, and re-enable workaround. Plan a maintenance window and a console or out-of-band recovery path. A host firewall mistake can remove the very network access needed to repair it.
Monitor the control plane, not only pods
Monitor host endpoint policy verdicts, interface coverage, agent restarts, and node health. A node that stops sending metrics may be isolated rather than healthy. Test recovery access through a console, serial connection, or a separately managed network before enforcing a policy that could block SSH or kubelet traffic.
Keep host firewall rules in the same review flow as cluster policies. A node selector can be broader than intended, and a cluster-wide object can affect every matching node. Review additions for management ports, storage, DNS, and control-plane communication. Avoid using a permissive rule as a shortcut unless the owner documents why the traffic cannot be narrowed.
Pod-level policy remains essential. Host firewall covers the node endpoint and hostNetwork paths, while ordinary pod interfaces need their own rules. The two layers should be tested together because a policy that appears correct at one layer can leave an unexpected path at the other.
Top comments (0)