Title : 1000ft How to Container-A > Container-B(netbird) >>>> Container-C(netbird) > Container-D #2062

Closed
opened 2025-11-20 06:12:08 -05:00 by saavagebueno · 3 comments
Owner

Originally created by @ks-nss on GitHub (Jul 10, 2025).

We have the following setup....

2 Servers (On Different Clouds)
Server-1 has Container-A & B
Server-2 has Container-C & D
A+B containers are attached the a docker network and C+D containers are on a docker network, this subnet is 192.168.110.0/24
A HTTP Server runs in Container D and has the IP 192.168.110.4

Netbird runs in both Containers B + C on servers 1/2, and they can ping each other

How do I get Container-A to connect to Container-D ?
I want to be able to run "curl http://192.168.110.4" on Container-A and for it to be able to connect to the a http server on Container-D

I know if I add a network/route for the Subnet 192.168.110.0/24 and set the netbird instance on Container-C as the "peer" I can do the following.
From Container-B(netbird) I can curl and can connect to the http service on Container-D
So I am 3/4 of the way there... I just can't figure out how I get routing from Container-A to B to work...

Not sure if this is a netbird issue or a container issue, but if anyone has any advice / pointers then that would be really helpful.

Thanks

Originally created by @ks-nss on GitHub (Jul 10, 2025). We have the following setup.... 2 Servers (On Different Clouds) Server-1 has Container-A & B Server-2 has Container-C & D A+B containers are attached the a docker network and C+D containers are on a docker network, this subnet is 192.168.110.0/24 A HTTP Server runs in Container D and has the IP 192.168.110.4 Netbird runs in both Containers B + C on servers 1/2, and they can ping each other How do I get Container-A to connect to Container-D ? I want to be able to run "curl http://192.168.110.4" on Container-A and for it to be able to connect to the a http server on Container-D I know if I add a network/route for the Subnet 192.168.110.0/24 and set the netbird instance on Container-C as the "peer" I can do the following. From Container-B(netbird) I can curl and can connect to the http service on Container-D So I am 3/4 of the way there... I just can't figure out how I get routing from Container-A to B to work... Not sure if this is a netbird issue or a container issue, but if anyone has any advice / pointers then that would be really helpful. Thanks
saavagebueno added the questionnetworking labels 2025-11-20 06:12:08 -05:00
Author
Owner

@nazarewk commented on GitHub (Jul 10, 2025):

This seems to be a site-to-site use case (Server 1/2 being sites), NetBird-wise you'd do something like:

  • create Network Route 1:
    • routed through Container B
    • handling Server 1's Docker network range
    • advertised to Container C
  • create Network Route 2:
    • routed through Container C
    • handling Server 2's Docker network range
    • advertised to Container B

Then, within the respective Docker networks (aka sites) you need to somehow set up the rules to:

  • on Server 1's Docker network/Container A to route Server 2's docker ip range through Container B
  • on Server 2's Docker network/Container D to router Server 1's docker ip range through Container C

This seems to be docker-specific question, I am not sure how to achieve it within Docker, but you might have some luck setting up the routes on the hosts (Server 1/2) instead of within the container. That would make Server 2's network accessible to everything on Server 1, but should work.

@nazarewk commented on GitHub (Jul 10, 2025): This seems to be a site-to-site use case (Server 1/2 being sites), NetBird-wise you'd do something like: - create Network Route 1: - routed through Container B - handling Server 1's Docker network range - advertised to Container C - create Network Route 2: - routed through Container C - handling Server 2's Docker network range - advertised to Container B Then, within the respective Docker networks (aka sites) you need to somehow set up the rules to: - on Server 1's Docker network/Container A to route Server 2's docker ip range through Container B - on Server 2's Docker network/Container D to router Server 1's docker ip range through Container C This seems to be docker-specific question, I am not sure how to achieve it within Docker, but you might have **some** luck setting up the routes on the hosts (Server 1/2) instead of within the container. That would make Server 2's network accessible to everything on Server 1, but should work.
Author
Owner

@ks-nss commented on GitHub (Jul 10, 2025):

Thanks for the reply @nazarewk. I think your right this is more of a docker issue than a Netbird one. I don't really know how Netbird works but I was hoping I could someone get one "central" Netbird instance in a container on a server, and somehow get other containers to magically send their traffic via that one Netbird container.

Having thought a bit more about this, I now think I want each of my containers to have their own Netbird (sidecar?). So I will close this issue and open another one.

@ks-nss commented on GitHub (Jul 10, 2025): Thanks for the reply @nazarewk. I think your right this is more of a docker issue than a Netbird one. I don't really know how Netbird works but I was hoping I could someone get one "central" Netbird instance in a container on a server, and somehow get other containers to magically send their traffic via that one Netbird container. Having thought a bit more about this, I now think I want each of my containers to have their own Netbird (sidecar?). So I will close this issue and open another one.
Author
Owner

@nazarewk commented on GitHub (Jul 11, 2025):

@ks-nss you could always run the NetBird container with host networking for the IP-based connectivity to work. I am not 100% sure if/how to integrate the DNS there, though.

@nazarewk commented on GitHub (Jul 11, 2025): @ks-nss you could always run the NetBird container with host networking for the IP-based connectivity to work. I am not 100% sure if/how to integrate the DNS there, though.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#2062