I have machines HOST-A, HOST-B, HOST-C over a local network.
On HOST-A (Linux Ubuntu) I am running some containers within a docker network.
I need the applications within the containers to talk with applications on HOST-B, HOST-C over UDP, both unicast and multicast.
ping is working by default from the docker containers.
ping is working from HOST-B, HOST-C to the docker network addresses if I add HOST-A as default gw for 172.18.0.0 (docker network).
Unfortunately the communication between the applications on docker containers and the physical hosts doesn’t work.
If I start the containers using “net=host” everything works fine
My understanding is that docker itself adds iptables rules for enabling the communication between the local host and the docker networks, but I can’t understand how these rules would interfere with the simple rule I’d like to add (basically enabling the forwarding of all the UDP packets, don’t want to do natting for the time being)
I have tried to simply add the iptables rule
“sudo iptables -A FORWARD -p udp -j ACCEPT”
But it is not working.
Any suggestion about how to enable the udp communication between my docker and physical network ?