# Test published Docker ports beyond the host ufw rule list

> An apparently restrictive ufw policy may not describe the path taken by container traffic.

- Canonical URL: https://update.dsesecurity.com/updates/test-published-docker-ports-beyond-the-host-ufw-rule-list/
- Publisher: Detection Systems & Engineering (DSE Security)
- Author: DSE Security Editorial Team
- Published: 2026-10-20T18:15:14+00:00
- Modified: 2026-10-20T18:34:32+00:00
- Last reviewed by DSE: 2026-10-20
- Resource type: Guide
- DSE priority: Information
- Topics: IT, Networks & Infrastructure
- Reading time: 2 minutes

## What you need to know

An apparently restrictive ufw policy may not describe the path taken by container traffic.

## Potentially affected

Review Docker-published traffic through the Linux packet-filtering path described in the ufw guidance.

## DSE recommendation

DSE recommends inventorying published addresses and ports and testing reachability from the relevant external network.

## Article

An apparently restrictive ufw policy may not describe the path taken by container traffic.

## Source facts

Docker documents that published container traffic is diverted through its networking rules before reaching the INPUT and OUTPUT chains used by ufw. Consequently, ufw rules can be effectively bypassed for that path. Docker also warns against disabling its rule management without suitable replacement, because container networking relies on those rules.

Source: [Docker documentation — Packet filtering and firewalls](https://docs.docker.com/engine/network/packet-filtering-firewalls/).

## Applicability

Review Docker-published traffic through the Linux packet-filtering path described in the ufw guidance.

## DSE recommendation

DSE recommends inventorying published addresses and ports and testing reachability from the relevant external network. Keep host-service exposure and container-published exposure as separate review items. Use the supported Docker filtering mechanism for the installed backend rather than assuming an ordinary host rule automatically protects every published listener. Do not disable Docker networking controls as a quick hardening step without a complete replacement design. Record the expected allowed and denied paths with the application owner before changing a production port mapping.

## Verification

On an approved test host, compare a host listener and a published container port from both allowed and denied source locations. Inspect the effective forwarding path without disrupting unrelated rules. Confirm the final policy is enforced by observed reachability, not solely by the appearance of a ufw status display. Retain the published bind address, protocol and source location with every observation. Have the network owner reconcile an unexpectedly reachable port with the actual forwarding rules before approving the final exposure inventory.

## Official reference

[Docker documentation — Packet filtering and firewalls](https://docs.docker.com/engine/network/packet-filtering-firewalls/). Reviewed October 20, 2026.

## Primary reference

- Name: Docker documentation — Packet filtering and firewalls
- Authority: docs.docker.com
- URL: https://docs.docker.com/engine/network/packet-filtering-firewalls/
- Source publication date: Not stated by the source

## Citation and use

Preferred citation: “Test published Docker ports beyond the host ufw rule list,” DSE Security, https://update.dsesecurity.com/updates/test-published-docker-ports-beyond-the-host-ufw-rule-list/
Publishing principles: https://update.dsesecurity.com/updates/dse-updates-editorial-methodology/
Usage and citation policy: https://update.dsesecurity.com/usage/
Copyright © 2026 Detection Systems & Engineering. All rights reserved.
