How to send a packet to a Docker Container which is on an overlay network?

Viewed 26

Goal: I need to send rtp traffic from coturn running on one container to a different application running on another container on a different host.

Configuration: I have two docker containers on two different hosts and the containers are on an overlay network. Host1 IP: 10.2.4.9, Host2 IP: 10.2.4.55 Container1 overlay IP: 172.7.2.5, Container2 overlay IP: 172.7.2.9

Question: Do I communicate using the host IP, or do I use the IP of the overlay container. I need to configure coturn to use an IP and I am not sure which IP to use; the host IP or the container overlay IP?

Recap and what I have tried:

  • I Have coturn running on Host1(10.2.4.9) in container1 (overlay IP address 172.7.2.5), and the coturn ports are 30000-30100.
  • I Have a 2nd application running on Host2(10.2.4.55) in container2 (overlay IP address 172.7.2.9).

I am able to ping between the hosts and containers, so I have full north-south, and east-west communication.

  1. I tried configuring the container1 (coturn) IP Address to use the host1 IP of 10.2.4.9 and running the container2 application on Host2 publishing ports 30000-30100 (container2 needs to receive the packets from container1), but container2 does not receive the packets from container1.

  2. I tried configuring the coturn IP Address to be container1 IP of 172.7.2.5 and running the container2 application on Host2 publishing ports 30000-30100, but container2 still does not receive the packets from container1.

Thank you.

0 Answers
Related