---
title: "Policy rules"
description: "Control traffic to/from endpoints using Calico network policy rules."
product: "Calico Enterprise"
version: "3.21"
section: "Network policy"
canonical_url: "https://docs.tigera.io/calico-enterprise/3.21/network-policy/beginners/policy-rules/"
---

# Policy rules

## [📄️Basic rules](https://docs.tigera.io/calico-enterprise/3.21/network-policy/beginners/policy-rules/policy-rules-overview.md)

[Define network connectivity for Calico endpoints using policy rules and label selectors.](https://docs.tigera.io/calico-enterprise/3.21/network-policy/beginners/policy-rules/policy-rules-overview.md)

## [📄️Use namespace rules in policy](https://docs.tigera.io/calico-enterprise/3.21/network-policy/beginners/policy-rules/namespace-policy.md)

[Use namespaces and namespace selectors in Calico network policy to group or separate resources. Use network policies to allow or deny traffic to/from pods that belong to specific namespaces.](https://docs.tigera.io/calico-enterprise/3.21/network-policy/beginners/policy-rules/namespace-policy.md)

## [📄️Use service accounts rules in policy](https://docs.tigera.io/calico-enterprise/3.21/network-policy/beginners/policy-rules/service-accounts.md)

[Use Kubernetes service accounts in policies to validate cryptographic identities and/or manage RBAC controlled high-priority rules across teams.](https://docs.tigera.io/calico-enterprise/3.21/network-policy/beginners/policy-rules/service-accounts.md)

## [📄️Use service rules in policy](https://docs.tigera.io/calico-enterprise/3.21/network-policy/beginners/policy-rules/service-policy.md)

[Use Kubernetes Service names in policy rules.](https://docs.tigera.io/calico-enterprise/3.21/network-policy/beginners/policy-rules/service-policy.md)

## [📄️Use external IPs or networks rules in policy](https://docs.tigera.io/calico-enterprise/3.21/network-policy/beginners/policy-rules/external-ips-policy.md)

[Limit egress and ingress traffic using IP address either directly within Calico network policy or managed as Calico network sets.](https://docs.tigera.io/calico-enterprise/3.21/network-policy/beginners/policy-rules/external-ips-policy.md)

## [📄️Use ICMP/ping rules in policy](https://docs.tigera.io/calico-enterprise/3.21/network-policy/beginners/policy-rules/icmp-ping.md)

[Control where ICMP/ping is used by creating a Calico network policy to allow and deny ICMP/ping messages for workloads and host endpoints.](https://docs.tigera.io/calico-enterprise/3.21/network-policy/beginners/policy-rules/icmp-ping.md)
