---
title: Build network security policies · Cloudflare Learning Paths
description: After creating policies for security based on DNS resolution, we
  can layer in additional security controls with the Gateway network firewall,
  which operates at Layer 4 of the OSI model. The Gateway network firewall
  allows you to build specific policies to block users or services' ability to
  connect to endpoints at specific IPs or on specific ports. You can also use
  Protocol Detection to block proxying specific protocols.
lastUpdated: 2025-10-22T21:11:06.000Z
chatbotDeprioritize: false
source_url:
  html: https://developers.cloudflare.com/learning-paths/secure-internet-traffic/build-network-policies/
  md: https://developers.cloudflare.com/learning-paths/secure-internet-traffic/build-network-policies/index.md
---

After creating policies for security based on DNS resolution, we can layer in additional security controls with the Gateway network firewall, which operates at Layer 4 of the OSI model. The Gateway network firewall allows you to build specific policies to block users or services' ability to connect to endpoints at specific IPs or on specific ports. You can also use [Protocol Detection](https://developers.cloudflare.com/cloudflare-one/traffic-policies/network-policies/protocol-detection/) to block proxying specific protocols.

## Objectives

By the end of this module, you will be able to:

* Creat your first Gateway network policy.
* Add recommended network security policies.
