---
title: "Prevent DNS (and other) Spoofing with Calico"
source: "https://www.tigera.io/blog/prevent-dns-and-other-spoofing-with-calico/"
---

[Technical Blog](https://www.tigera.io/category/technical-blog/)

# Prevent DNS (and other) Spoofing with Calico

By [Spike Curtis](https://www.tigera.io/blog/author/spike/) on Sep 05, 2019 • 4 min read

AquaSec’s Daniel Sagi recently authored [a blog post about DNS spoofing in Kubernetes](http://blog.aquasec.com/dns-spoofing-kubernetes-clusters). TLDR is that if you use default networking in Kubernetes you might be vulnerable to ARP spoofing which can allow pods to spoof (impersonate) the IP addresses of other pods. Since so much traffic is dialed via domain names rather than IPs, spoofing DNS can allow you to redirect lots of traffic inside the cluster for nefarious purposes.

So this is bad, right? Fortunately, Calico already prevents ARP spoofing out of the box. Furthermore, Calico’s design prevents other classes of spoofing attacks. In this post we’ll discuss how Calico keeps you safe from IP address spoofing, and how to go above and beyond for extra security.

## ARP Spoofing

ARP spoofing is an attack that allows a malicious pod or network endpoint to receive IP traffic that isn’t meant for it. [Sagi’s post](http://blog.aquasec.com/dns-spoofing-kubernetes-clusters) already describes this well, so I won’t repeat the details here. An important thing to note, however, is that ARP spoofing only works if the malicious entity and the target share the same layer 2 segment (e.g. have direct Ethernet connectivity). In Calico, the network is fully routed at layer 3, meaning that each pod is on its own isolated layer 2 segment. ARP spoofing by pods is stopped dead in its tracks.

Calico directly programs the routing table that determines where IP packets are forwarded based on the known IP addresses of the pods, never basing the decision on a protocol like ARP which is partially under control of the potential attacker.

## IP Spoofing

So Calico ensures that IP packets are delivered to the correct pods by avoiding ARP altogether within the node, but what about pods spoofing their source IPs?

The idea here is that if a pod is granted CAP_NET_ADMIN, it can just add an IP address to its network interface inside the pod. Or if it has CAP_NET_RAW it could construct IP packets with spoofed addresses and send them over the interface at the Ethernet layer.

Calico was designed from the get-go to stop this kind of spoofing. Regardless of what the malicious entity can do *from within* the pod, these packets are processed by the host kernel in the root network namespace where Calico has programmed it to be on the defensive against spoofing.

By using a kernel feature called *reverse path filtering*, IP packets with source addresses that are not the pod’s real address are dropped.  Reverse path filtering isn’t some fancy new kernel feature: it’s tried and true and hardened by years of operational experience. The idea is for every packet that is processed, look up how to route back to the source. If the packet came through a different interface than the one the kernel would use to forward to it, drop the packet. Since Calico programs the IP routes for each pod, this effectively stops them from sending packets as any address other than their real address.

## CAP_NET_ADMIN and CAP_NET_RAW

While Calico automatically mitigates the most abusive uses of the NET_ADMIN and NET_RAW capabilities, Sagi is correct that you should ask yourself whether particular applications actually need these capabilities.

NET_RAW is used for the Internet Control and Management Protocol (ICMP), including the `ping` command. While useful for operators when diagnosing connectivity problems, applications typically don’t need it, and it can be exploited by attackers to do reconnaissance on your network. NET_RAW also allows the attacker to bypass the standard kernel TCP stack, potentially allowing them to more effectively launch denial of service attacks like SYN flooding.

NET_ADMIN allows reconfiguration of network interfaces and iptables rules inside the pod (it does not grant the ability to modify the way Calico uses this in the root network namespace). These capabilities could allow attackers to redirect traffic inside the pod, set up tunnels for data exfiltration, etc.

Beyond using Pod Security Policy to restrict the use of these capabilities, you can use Calico network policy to further police the use of the network. For example, you can [allow pods to use ICMP in `ping` mode, but disallow other commands](http://docs.projectcalico.org/master/security/icmp-ping#allow-icmp-ping-all-workloads-and-host-endpoints). You can also [whitelist egress destinations](http://docs.projectcalico.org/master/security/kubernetes-network-policy#create-egress-policies) to defend against attackers tunneling out of your cluster. You can also upgrade Calico to [Tigera Secure](https://www.tigera.io/tigera-products/compare-products/) to take advantage of network anomaly detection, which will warn you about unusual network activity automatically.

————————————————-

[**Free Online Training**](https://www.tigera.io/events/)

Access Live and On-Demand Kubernetes Tutorials

[**Calico Enterprise – Free Trial**](https://www.calicocloud.io/home)

Solve Common Kubernetes Roadblocks and Advance Your Enterprise Adoption

[Open Source](https://www.tigera.io/tags/open-source/)[Products](https://www.tigera.io/tags/products/)[Project Calico](https://www.tigera.io/tags/project-calico/)

## Related posts

[![Meet Mylo: An AI-native way to work with Calico](https://www.tigera.io/app/uploads/2026/09/Meet-Mylo-An-AI-native-way-to-work-with-Calico.png)](https://www.tigera.io/blog/meet-mylo-an-ai-native-way-to-work-with-calico/)

#### [Meet Mylo: An AI-native way to work with Calico](https://www.tigera.io/blog/meet-mylo-an-ai-native-way-to-work-with-calico/)

By [Phil DiCorpo](https://www.tigera.io/blog/author/phil-dicorpo/)
on Sep 3, 2026

A library of Calico tools and skills — delivered through the Calico MCP Server What if your hardest network question took ten minutes instead of ten days? Anyone who has operated Kubernetes networking at scale...

[Read more](https://www.tigera.io/blog/meet-mylo-an-ai-native-way-to-work-with-calico/)

[![The Safest Place to Run an AI Agent Is On a Cluster That Doesn’t Trust It](https://www.tigera.io/app/uploads/2026/08/The-Safest-Place-to-Run-an-AI-Agent-Is-On-a-Cluster-That-Doesnt-Trust-It.png)](https://www.tigera.io/blog/the-safest-place-to-run-an-ai-agent-is-on-a-cluster-that-doesnt-trust-it/)

#### [The Safest Place to Run an AI Agent Is On a Cluster That Doesn’t Trust It](https://www.tigera.io/blog/the-safest-place-to-run-an-ai-agent-is-on-a-cluster-that-doesnt-trust-it/)

By [Alister Baroi](https://www.tigera.io/blog/author/alister-baroi/)
on Aug 27, 2026

Every organization running AI agents has already made a hosting decision. Most made it by accident. The sales team switched on the agent built into their CRM. Engineering is piloting a coding agent in a...

[Read more](https://www.tigera.io/blog/the-safest-place-to-run-an-ai-agent-is-on-a-cluster-that-doesnt-trust-it/)

[![AI Red Team Agents Automate Attacks on your AI Agents. Runtime Policies Automate their Defense.](https://www.tigera.io/app/uploads/2026/08/AI-Red-Team-Agents-Automate-Attacks-on-your-AI-Agents.-Runtime-Policies-Automate-their-Defense.png)](https://www.tigera.io/blog/ai-red-team-agents-automate-attacks-on-your-ai-agents-runtime-policies-automate-their-defense/)

#### [AI Red Team Agents Automate Attacks on your AI Agents. Runtime Policies Automate their Defense.](https://www.tigera.io/blog/ai-red-team-agents-automate-attacks-on-your-ai-agents-runtime-policies-automate-their-defense/)

By [Alister Baroi](https://www.tigera.io/blog/author/alister-baroi/)
on Aug 24, 2026

The AI red teaming market grew up fast this year. OpenAI bought Promptfoo, Cisco and Microsoft shipped automated attack suites, and a seed-stage startup publicly compromised 50 of 55 live customer service bots. These platforms...

[Read more](https://www.tigera.io/blog/ai-red-team-agents-automate-attacks-on-your-ai-agents-runtime-policies-automate-their-defense/)

<!-- plugin=object-cache-pro client=phpredis metric#hits=3190 metric#misses=33 metric#hit-ratio=99.0 metric#bytes=1520789 metric#prefetches=0 metric#store-reads=165 metric#store-writes=14 metric#store-hits=159 metric#store-misses=22 metric#sql-queries=30 metric#ms-total=492.27 metric#ms-cache=29.56 metric#ms-cache-avg=0.1660 metric#ms-cache-ratio=6.0 sample#redis-hits=51671051 sample#redis-misses=14774303 sample#redis-hit-ratio=77.8 sample#redis-ops-per-sec=75 sample#redis-evicted-keys=0 sample#redis-used-memory=131309088 sample#redis-used-memory-rss=124141568 sample#redis-memory-fragmentation-ratio=0.9 sample#redis-connected-clients=1 sample#redis-tracking-clients=0 sample#redis-rejected-connections=0 sample#redis-keys=72944 -->
