I have 3 raspberry pi in a daisy-chain network, with ip routes and iptables accept fwd - all three hosts can reach each others:
A <--> B <--> C
However a container from docker-compose running with default bridge network driver on A, cannot reach C.
Pi A (10.58.3.1):
ip route add 10.76.5.0/24 via 10.58.3.3- has docker-compose with default bridge network driver
Pi B (10.58.3.3 and 10.76.5.1):
iptables -A FORWARD -j ACCEPT
Pi C (10.76.5.5):
ip route add 10.58.3.0/24 via 10.76.5.1
Tried nexthop with both the bridge (172.22.0.1) and container IPs (172.22.0.4), eg: ip route add 10.76.5.0/24 nexthop via 10.58.3.3 nexthop via 172.22.0.1 but get RTNETLINK answers: File exists
Tried defining bridge in docker-compose with option com.docker.network.bridge.host_binding_ipv4": "0.0.0.0" but can't find any clear documentation here so am lost.
How can I reach C from the container running on A?
ip routecommand on hostA, hostB, and hostC, and also in the container? The configuration you've described here should "just work" with only the twoip routecommands you show for hostA and hostC, respectively.