Conflict with default DROP policy on filter:OUTPUT chain
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 2.2k
- Forks
- 875
- PR merge metrics
- No merged PRs in 30d
Description
While working with hosts that are set to explicitly filter outbound traffic (a requirement in some regulatory scenarios), I've run into some challenges communicating from the host to published ports originating on a container network. With a bit of tracing, I narrowed the issue down to a default DROP policy on the OUTPUT chain of the iptables filter table.
Given that Docker is dynamically injecting rules into the FORWARD chain as well as the nat table, it seems it'd be in a pretty good position to detect and resolve conflicts on the OUTPUT chain of filter. The rules need to match traffic OUTPUT through a bridge interface (default or custom) and jump to the DOCKER chain (which will accept if the traffic is being sent to a published port).
The scenario I'm testing against is as follows:
iptables -t filter -P OUTPUT DROP- Network
mail-netis a custom, bridged network - Container
imapis attached tomail-netand publishes127.0.0.1:143:143 - Local processes cannot reach the published service, e.g.,
nc localhost 143
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the scenario with iptables -t filter -P OUTPUT DROP, the custom mail-net bridge, the imap container, and nc localhost 143. Trace the rules Docker injects into the FORWARD chain and nat table, then determine the required OUTPUT handling for traffic through the bridge; done means local processes can reach the published service without weakening the default DROP policy.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100