Docker Port Bindings Can Bypass Host Firewalls: A Python Auditor Flags Them
Docker inserts its own packet-filter rules ahead of the host firewall, so ports that appear locked down in UFW or firewalld may still be reachable from the network. Common causes include Compose files publishing ports on all interfaces, services using network_mode: host, and IPv4 loopback binds sitting alongside an IPv6 wildcard. PortExpose is a standard-library Python script that reads Compose files and docker inspect JSON, classifies each published binding by risk, and prints a report without modifying firewall rules. Users run it with Python 3.8 or newer, merge multiple Compose files with -f, optionally request JSON output with --json, and pass inspect data through --inspect-json. A successful audit exits 0 even when it reports CRITICAL or HIGH findings, so users must read the report contents themselves.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in