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
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.
License: CC-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.
Cite this
iinventedlight. 2026. "Docker packet filtering: firewall rules on Linux bridge networks." iinventedlight Library, iil:note:st1wzdcx, version of 2026-11-26. https://iinventedlight.com/library/notes/docker-packet-filtering/. License: CC-BY-4.0.
@misc{iil_note_st1wzdcx,
author = {{iinventedlight}},
title = {{Docker packet filtering: firewall rules on Linux bridge networks}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-26},
url = {https://iinventedlight.com/library/notes/docker-packet-filtering/},
note = {Permanent ID iil:note:st1wzdcx. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
Extra files beside this note
These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.
- docker-packet-filtering.schema.json (schema; CC-BY-4.0)
- docker-packet-filtering.table.json (table; CC-BY-4.0)
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/docker-packet-filtering.md.