---
title: "Network firewall vs. application firewall: what is the difference | StreetHosting"
description: "Learn how a network firewall, which controls ports and IPs, differs from an application firewall, which understands web traffic, and how they work together."
url: "https://streethosting.com.br/en/guides/infrastructure/network-firewall-vs-application-firewall"
type: "page"
language: "en-US"
---

Infrastructure · 3 min · Intermediate

Published on Jun 17, 2026 · Updated on Jun 17, 2026

# Network firewall vs. application firewall

A network firewall decides which ports and IPs get through. An application firewall understands the content of web requests. They are different layers that together make a solid defense.

By [Equipe StreetHosting](https://streethosting.com.br/en/autores#equipe-streethosting) · StreetHosting infrastructure and support team

[Security and hardening](https://streethosting.com.br/en/guides/topics/security)

Summarize with:

[](https://chat.openai.com/?q=Summarize%20the%20key%20points%20of%20this%20StreetHosting%20guide%3A%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Finfrastructure%2Fnetwork-firewall-vs-application-firewall.%20Highlight%20the%20step-by-step%20instructions%2C%20the%20prerequisites%20and%20the%20most%20common%20mistakes. "ChatGPT") [](https://claude.ai/new?q=Summarize%20the%20key%20points%20of%20this%20StreetHosting%20guide%3A%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Finfrastructure%2Fnetwork-firewall-vs-application-firewall.%20Highlight%20the%20step-by-step%20instructions%2C%20the%20prerequisites%20and%20the%20most%20common%20mistakes. "Claude") [](https://www.google.com/search?udm=50&aep=11&q=Summarize%20the%20key%20points%20of%20this%20StreetHosting%20guide%3A%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Finfrastructure%2Fnetwork-firewall-vs-application-firewall.%20Highlight%20the%20step-by-step%20instructions%2C%20the%20prerequisites%20and%20the%20most%20common%20mistakes. "Google AI Mode") [](https://x.com/i/grok?text=Summarize%20the%20key%20points%20of%20this%20StreetHosting%20guide%3A%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Finfrastructure%2Fnetwork-firewall-vs-application-firewall.%20Highlight%20the%20step-by-step%20instructions%2C%20the%20prerequisites%20and%20the%20most%20common%20mistakes. "Grok") [](https://www.perplexity.ai/search/new?q=Summarize%20the%20key%20points%20of%20this%20StreetHosting%20guide%3A%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Finfrastructure%2Fnetwork-firewall-vs-application-firewall.%20Highlight%20the%20step-by-step%20instructions%2C%20the%20prerequisites%20and%20the%20most%20common%20mistakes. "Perplexity")

Share:

[](https://x.com/intent/tweet?text=Network%20firewall%20vs.%20application%20firewall%3A%20what%20is%20the%20difference&url=https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Finfrastructure%2Fnetwork-firewall-vs-application-firewall "Share on X") [](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Finfrastructure%2Fnetwork-firewall-vs-application-firewall "Share on Facebook") [](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Finfrastructure%2Fnetwork-firewall-vs-application-firewall "Share on LinkedIn") [](https://wa.me/?text=Network%20firewall%20vs.%20application%20firewall%3A%20what%20is%20the%20difference%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Finfrastructure%2Fnetwork-firewall-vs-application-firewall "Share on WhatsApp")

For agents: Copy as Markdown [.md](https://streethosting.com.br/en/guides/infrastructure/network-firewall-vs-application-firewall.md)

In this guide 5 sections

* [Two different layers](https://streethosting.com.br/en/guides/infrastructure/network-firewall-vs-application-firewall#duas-camadas)
* [Network firewall](https://streethosting.com.br/en/guides/infrastructure/network-firewall-vs-application-firewall#firewall-de-rede)
* [Application firewall](https://streethosting.com.br/en/guides/infrastructure/network-firewall-vs-application-firewall#firewall-de-aplicacao)
* [How they complement each other](https://streethosting.com.br/en/guides/infrastructure/network-firewall-vs-application-firewall#se-complementam)
* [For game servers](https://streethosting.com.br/en/guides/infrastructure/network-firewall-vs-application-firewall#para-jogos)

Quick answer

The **network firewall** controls ports and IPs, deciding which traffic reaches the machine. The **application firewall**, or WAF, understands the content of web requests and blocks attacks that come through the right port. They are different layers that complement each other: one stops what should never arrive, the other filters what looks normal but is malicious.

## Two different layers[](https://streethosting.com.br/en/guides/infrastructure/network-firewall-vs-application-firewall#duas-camadas)

Server security is built in layers. A network firewall and an application firewall do not compete: they look at different things. One controls who can knock on the door, the other inspects what is said once the door opens. Understanding this split helps you build a defense without gaps.

## Network firewall[](https://streethosting.com.br/en/guides/infrastructure/network-firewall-vs-application-firewall#firewall-de-rede)

The network firewall works with ports and addresses. It allows only what is necessary and blocks the rest. It is the layer you configure on a VPS with UFW, as shown in [UFW firewall on an Ubuntu VPS](https://streethosting.com.br/en/guides/vps/ufw-firewall-ubuntu-vps). It is the first barrier, simple and effective.

## Application firewall[](https://streethosting.com.br/en/guides/infrastructure/network-firewall-vs-application-firewall#firewall-de-aplicacao)

The application firewall, known as a WAF, goes beyond ports. It reads the content of web requests and blocks attack patterns that look like legitimate traffic. It protects websites, panels and stores from abuse that a network firewall has no way of seeing.

## How they complement each other[](https://streethosting.com.br/en/guides/infrastructure/network-firewall-vs-application-firewall#se-complementam)

| Layer                | What it controls | Example of a blocked threat            |
| -------------------- | ---------------- | -------------------------------------- |
| Network firewall     | Ports and IPs    | Access to a port that should be closed |
| Application firewall | Web content      | Malicious request in a form            |
| Edge protection      | Traffic volume   | Volumetric DDoS attack                 |

## For game servers[](https://streethosting.com.br/en/guides/infrastructure/network-firewall-vs-application-firewall#para-jogos)

* Network firewall opening only the ports in use
* WAF protecting the website, panel and store
* Edge protection against volumetric attacks
* Specific defense for the game port

The game port needs its own protection, as described in [Anti-DDoS for game servers](https://streethosting.com.br/en/guides/infrastructure/anti-ddos-game-server-brazil). For multi-layer infrastructure in São Paulo, check out the [dedicated servers](https://streethosting.com.br/en/dedicated) and the [Ryzen VPS](https://streethosting.com.br/en/vps/ryzen).

In this guide

* [Two different layers](https://streethosting.com.br/en/guides/infrastructure/network-firewall-vs-application-firewall#duas-camadas)
* [Network firewall](https://streethosting.com.br/en/guides/infrastructure/network-firewall-vs-application-firewall#firewall-de-rede)
* [Application firewall](https://streethosting.com.br/en/guides/infrastructure/network-firewall-vs-application-firewall#firewall-de-aplicacao)
* [How they complement each other](https://streethosting.com.br/en/guides/infrastructure/network-firewall-vs-application-firewall#se-complementam)
* [For game servers](https://streethosting.com.br/en/guides/infrastructure/network-firewall-vs-application-firewall#para-jogos)

## Frequently asked questions

What is the difference between the two firewalls?

The network firewall works with ports and addresses: it decides which traffic can reach the machine. The application firewall understands the content of web requests and blocks attacks that look like normal network traffic.

Does one replace the other?

No. They act on different layers. The network one stops what should never arrive. The application one filters attacks that come through the right port but carry malicious content. Together they cover more than either one alone.

What is a WAF?

WAF is the name for a web application firewall. It inspects HTTP requests for attack patterns, such as injection and form abuse, which a network firewall cannot see because it only looks at ports and IPs.

Does a game server need an application firewall?

A web application firewall protects the website, the panel and the store. The game port needs its own protection, focused on the server's protocols. That is why game hosting combines a network firewall, edge protection and a WAF for the web side.

Next step

See dedicated servers

Exclusive hardware in São Paulo with NVMe and Anti-DDoS.

[See dedicated servers](https://streethosting.com.br/en/dedicated)

[See Ryzen VPS Ryzen 9 9950X VPS in São Paulo with root access, NVMe and gamer Anti-DDoS.](https://streethosting.com.br/en/vps/ryzen) [See Minecraft Pro Managed hosting on Ryzen with modpacks, optimized Paper and technical support.](https://streethosting.com.br/en/minecraft-pro)

## Related guides

[VPS Beginner UFW on Ubuntu VPS: firewall rules without losing SSH UFW makes the Ubuntu firewall simpler, but one rule in the wrong order locks you out of your VPS. Learn how to enable it without losing SSH, open only what you need, deal with Docker, and get back in through the console if something goes wrong. 10 min Read guide](https://streethosting.com.br/en/guides/vps/ufw-firewall-ubuntu-vps) [Infrastructure Intermediate Anti-DDoS for game servers in Brazil: how edge protection works A DDoS attack on a game server can combine high volume, streams of tiny packets and fake connections to wear the network down. Effective mitigation starts before traffic reaches the server, with edge filtering, traffic analysis and an operation that is ready for real incidents. For anyone hosting communities in Brazil, the right choice cuts downtime during peak hours. 5 min Read guide](https://streethosting.com.br/en/guides/infrastructure/anti-ddos-game-server-brazil) [Infrastructure Intermediate Cloudflare for game server protection: what works Cloudflare helps your website and DNS, but it does not replace the host's UDP protection. This guide spares your gaming community a false sense of security. 2 min Read guide](https://streethosting.com.br/en/guides/infrastructure/cloudflare-game-server-protection)

[← Back to the Guide Center](https://streethosting.com.br/en/guides)
