Container Inherited Host Policy (CIHP) for C-VEN
CIHP applies to environments where host-level security is sufficient and Pod-to-Pod communication does not require enforcement. Because policy is enforced at the node level rather than per namespace or Pod, CIHP avoids the overhead associated with securing large numbers of individual Kubernetes workloads.
With CIHP, container workloads inherit the security policy of their underlying Kubernetes node. This provides a simpler and more scalable approach to protecting traffic entering and leaving the cluster, while allowing all Pod-to-Pod traffic within the cluster.
With CIHP, you can:
Allow Pod-to-Pod traffic — CIHP allows communication between pods within the Kubernetes cluster without applying separate policy enforcement between individual pods.
Control Pod-to-External traffic — enforce policy for traffic originating from pods to destinations outside the Kubernetes cluster.
Control External-to-Service traffic — enforce policy for traffic originating outside the cluster and reaching Kubernetes services exposed through NodePort or LoadBalancer.
How CIHP works
When you enable CIHP, the Container VEN (C-VEN) adds the following custom iptables rules to every managed node that isn't in Idle mode. You don't need to add these rules yourself.
-t filter -A FORWARD ! -i e+ ! -o e+ -m conntrack --ctstate NEW -j ACCEPT -t filter -A FORWARD -o e+ -m conntrack --ctstate NEW -j ILO-FILTER-OUTPUT -t filter -A FORWARD -i e+ -m conntrack --ctstate NEW -j ILO-FILTER-INPUT
The first rule allows all Pod-to-Pod traffic inside the cluster.
The second rule sends Pod-to-External traffic to the
ILO-FILTER-OUTPUTchain, where the C-VEN checks it against the host workload policy.The third rule sends External-to-NodePort and External-to-LoadBalancer traffic to the
ILO-FILTER-INPUTchain, where the C-VEN checks it against the host workload policy.
Prerequisites
Make sure your environment meets the following requirements:
All Kubernetes namespaces in the cluster are unmanaged.
Your Kubernetes nodes are in Full enforcement mode.
If you use the Flannel Container Network Interface (CNI), you must have infrastructure rules that allow node-to-node UDP traffic on port 8472. Flannel uses this port for Virtual Extensible LAN (VXLAN) traffic.
Enable CIHP for C-VEN
CIHP is disabled by default.
Upgrade your Illumio Helm chart values file, and set cven.cihp to true and enforceNodePortTraffic to never:
cven: cihp: true enforceNodePortTraffic: never
Write rules for CIHP traffic
With CIHP, you write rules for your host workloads, not for pods or namespaces. Use a label that identifies your Kubernetes node. The examples in this section use the label node.
Because every pod on a node inherits the node's policy, a rule applies to all pods on that node.
Allow Pod-to-External traffic
To let pods reach a destination outside the cluster, write an allow rule with the following values:
Source | Destination | Destination port |
|---|---|---|
| An IP list that contains the external IP addresses or FQDNs, or labels that identify the external workloads | The port of the external service |
For example, to let pods reach a service on port 443 at the addresses in an IP list named EXT_IP_LIST, write the following rule:
Source:
nodeDestination:
EXT_IP_LISTDestination port: 443
Allow External-to-NodePort traffic
To let external clients reach a NodePort or LoadBalancer service, write an allow rule with the following values:
Source | Destination | Destination port |
|---|---|---|
An IP list that contains the external IP addresses, or labels that identify the external workloads |
| The port of the backend pod, not the NodePort |
For example, if a NodePort service maps port 30500 to backend pod port 16500, write the rule for port 16500:
Source:
EXT_IP_LISTDestination: node
Destination port: 16500
Policy, enforcement, and visibility with CIHP
Policy is enforced at the node level
CIHP does not support granular, pod-level policy configuration, as available with namespace enforcement. For example, you cannot write a Pod-to-External rule targeting a single pod. Instead, rules apply to all pods on the node through the node’s policy.
Pod-to-Pod traffic isn't enforced
CIHP allows all Pod-to-Pod traffic inside the cluster. To enforce this traffic, you'd have to keep the short-lived IP addresses of your pods up to date in your rules. Allowing the full pod address range instead is the same as not enforcing Pod-to-Pod traffic at all.
Visibility is node-level only
You see traffic flows only at the node level. You can't filter flows by pod labels or other Kubernetes metadata.
Limitations for CIHP
FQDN-based rules don't work for External-to-NodePort traffic
Rules that use FQDNs to identify external workloads as the source of NodePort traffic don't work. The external workload resolves the FQDN when it starts the connection. The C-VEN runs on the destination node, so it can't see that DNS response and can't match the traffic to the rule. This limitation applies to all rules of this type, not only to CIHP.
Instead, use an IP list that contains IP addresses, or use labels that identify the external workloads.
FQDN-based Pod-to-External rules don't work with Cilium
Pod-to-External rules that use FQDNs to identify the destination will not work if:
Your cluster uses the Cilium CNI.
kubeProxyReplacementis set totrueorfalse.
Instead, use an IP list that contains IP addresses, or use labels that identify the external workloads.
NodePort and LoadBalancer enforcement with Cilium kube-proxy replacement
CIHP doesn't fully enforce policy for NodePort and LoadBalancer traffic if:
Your cluster uses the Cilium CNI.
kubeProxyReplacementis set totrue
There's one exception. CIHP writes NodePort rules for the backend pod port. When the backend pod runs on the same node that receives the incoming NodePort traffic, enforcement works fully.