Cilium HostFirewall guards node traffic, but it is disabled by default
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…
Cilium's HostFirewall provides network policy for Kubernetes nodes, but it is disabled by default. This firewall extends network policy to the node itself, ensuring that node-level enforcement is in place. However, it is essential to enable the host firewall in a test cluster or small node pool to confirm its effectiveness, as the Helm value alone does not guarantee proper policy implementation.
When enabling the host firewall, it is crucial to inventory the node's dependencies, such as API server access, etcd access, kubelet and health checks, overlay or native routing traffic, DNS, monitoring, and administrative access. Node-to-node traffic may also include storage, backup, and cluster services. After enabling the firewall, verify the enforcement of interfaces and ensure that HostNetwork pods, which can have full network connectivity without Cilium security policy by default, are covered by host policies.
The HostFirewall can be tested using Cilium's policy audit mode, which converts drops into observations to identify missing rules before enforcement. However, it is essential to recognize that audit mode does not enforce network policy and is not recommended for production. Instead, use it as a migration step to capture traffic, build rules for legitimate dependencies, review the result, and then enforce.
Regularly check the configuration state after every agent restart and rollout to ensure the cluster is protected, and plan a maintenance window and a console or out-of-band recovery path to address any potential issues caused by host firewall mistakes.
Brief written by urgent.news from Dev.to's own syndicated text. Machine-written — may contain errors; check the original before relying on it.