---
source: https://iinventedlight.com/library/notes/docker-packet-filtering.md
title: "Docker packet filtering: firewall rules on Linux bridge networks"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "Apache License 2.0 (Docker, Inc.); Apache License 2.0 (Docker, Inc.); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: Docker, Inc., Packet filtering and firewalls; Docker, Inc., Packet filtering and firewalls (source). Apache-2.0 (https://raw.githubusercontent.com/docker/docs/main/LICENSE). Copyright Docker, Inc."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-26
status: published
approved_by: "Cole Withington, 2026-11-27 14:30 PT: \"Yes, publish all of that now\""
checked_on: 2026-11-26
as_of: 2026-11-26
confidence: medium
untested: "Not reproduced (2026-11-26). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-devops: docker-packet-filtering"
tags: [docker, firewall, iptables, nftables, networking]
client: Librarian
sources:
  - id: S1
    title: "Packet filtering and firewalls"
    publisher: Docker, Inc.
    url: https://docs.docker.com/engine/network/packet-filtering-firewalls/
    accessed: 2026-11-26
    license: "Apache License 2.0"
  - id: S2
    title: "Packet filtering and firewalls (source)"
    publisher: Docker, Inc.
    url: https://raw.githubusercontent.com/docker/docs/main/content/manuals/engine/network/packet-filtering-firewalls.md
    accessed: 2026-11-26
    license: "Apache License 2.0"
---
# Docker packet filtering: firewall rules on Linux bridge networks
**Answer:** On Linux, Docker creates firewall rules for isolation, port publishing, and filtering.

## Where rules are created

No rules are created for ipvlan, macvlan or host networking.

Those rules are required for the correct functioning of Docker bridge networks.

Docker creates firewall rules for bridge networks only in that sense.

You should not modify the rules created by Docker.

## iptables and nftables

For bridge networks, iptables and nftables have the same functionality.

By default, Docker Engine creates its firewall rules using iptables.

It also has support for nftables.

The firewall-backend option selects which one is used.

## See also

- [docker-network](https://iinventedlight.com/library/notes/docker-network/)
- [docker-bridge-networks](https://iinventedlight.com/library/notes/docker-bridge-networks/)
- [docker-ipv6](https://iinventedlight.com/library/notes/docker-ipv6/)

## Claims

- id: C1
  claim: On Linux, Docker creates firewall rules for isolation, port publishing, and filtering.
  source: S1
  evidence: "Docker creates firewall rules to implement network isolation"

- id: C2
  claim: You should not modify the rules created by Docker.
  source: S1
  evidence: "you should not modify the rules created by Docker"

- id: C3
  claim: By default, Docker Engine creates its firewall rules using iptables.
  source: S2
  evidence: "creates its firewall rules using iptables"

- id: C4
  claim: For bridge networks, iptables and nftables have the same functionality.
  source: S2
  evidence: "iptables and nftables have the same functionality"

## Sources

- [S1] Packet filtering and firewalls. Docker, Inc.. https://docs.docker.com/engine/network/packet-filtering-firewalls/ . License: Apache License 2.0. Accessed 2026-11-26.

- [S2] Packet filtering and firewalls (source). Docker, Inc.. https://raw.githubusercontent.com/docker/docs/main/content/manuals/engine/network/packet-filtering-firewalls.md . License: Apache License 2.0. Accessed 2026-11-26.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Docker, Inc., Packet filtering and firewalls; Docker, Inc., Packet filtering and firewalls (source). Apache-2.0 (https://raw.githubusercontent.com/docker/docs/main/LICENSE). Copyright Docker, Inc. Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
