← All notes

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

Sources

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

Permanent ID: iil:note:st1wzdcx

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.},
}

Markdown

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.

All artifact files (JSON index)

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.