Skip to content

Commit

Permalink
chore(docs): add intra-bridge filtering to troubleshooting
Browse files Browse the repository at this point in the history
Previously this was only documented in the
`ContainerToContainer::default_policy` reference, where it was not
trivial to find.

Relates to #568.
  • Loading branch information
pitkley committed May 29, 2022
1 parent cc3897a commit 2c71723
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docs/TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,30 @@ If you are experiencing issues with DFW that you don't find represented here, fe

---

* [Can't filter container-to-container traffic in same network](#cant-filter-container-to-container-traffic-in-same-network)
* [modprobe error when running in Docker](#modprobe-error-when-running-in-docker)
* [set up rule failed, `DOCKER_OUTPUT`/`DOCKER_POSTROUTING`](#set-up-rule-failed-docker_outputdocker_postrouting)

---

## Can't filter container-to-container traffic in same network

Depending on how your host is configured, traffic whose origin and destination interface are the same Docker network (i.e. the same *bridge*) is not filtered by the kernel netfilter module.
This means that both the default policy and any rules specified in the `[container_to_container]` section are not applied for traffic between containers that are on the same Docker network, but instead only for traffic that traverses two distinct Docker networks/bridges.

If your kernel has the `br_netfilter` kernel-module available, you can set the `sysctl net.bridge.bridge-nf-call-iptables` to `1` to have the netfilter-module act on traffic within the same bridge, too. You can set this value temporarily like this:

```
sysctl net.bridge.bridge-nf-call-iptables=1
```

To permanently set this configuration, take a look at `man sysctl.d` and `man sysctl.conf`.

See also:

- [Issue #568](https://github.com/pitkley/dfw/issues/568)
- [`ContainerToContainer::default_policy` reference](https://dfw.rs/1.2.1/dfw/types/struct.ContainerToContainer.html#filtering-traffic-within-the-same-bridge)

## modprobe error when running in Docker

```
Expand Down

0 comments on commit 2c71723

Please sign in to comment.