0

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?

2
  • 2
    Would you update your question to include the output of the ip route command on hostA, hostB, and hostC, and also in the container? The configuration you've described here should "just work" with only the two ip route commands you show for hostA and hostC, respectively. Commented Sep 10, 2023 at 23:39
  • @larsks 👍 thank you for asserting that this should "just work" - helped me narrow down the problem in minutes rather than the hours already lost googling. Commented Sep 11, 2023 at 9:48

1 Answer 1

0

The problem was between the chair and keyboard and had fat fingers 🤦

Days ago I'd hacked around with the configuration file for container app and rewired some paths incorrectly. Only noticed I hadn't reverted when capturing additional info re: @lasks comment.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.