I am trying to link a WiFi hotspot from one container to another.
I enabled a WiFi hotspot with dbus from my Network Manager container that is going to be receiving video streams over RTSP. After connecting my camera to the hotspot, another container (Nimble Agent) can not see that ip. How do I link the wlan0 interface between the services?
Hi there, you will need to make sure the IP subnet where your wireless clients are can be reached by the other container. Are you able to reach the client IP from the NM container and if so, what does the routing table look like for both containers?
I can not from the NM container, you can’t if ping is forced from eth0
These are the routes from NM:
default via 192.168.1.1 dev eth0 metric 100
10.42.0.0/24 dev wlan0 scope link src 10.42.0.1 metric 600
10.114.101.0/24 dev balena0 scope link src 10.114.101.1
10.114.102.0/24 dev resin-dns scope link src 10.114.102.1
10.114.104.0/25 dev supervisor0 scope link src 10.114.104.1
52.4.252.97 dev resin-vpn scope link src 10.240.49.60
172.17.0.0/16 dev br-4bcae92b28f8 scope link src 172.17.0.1
172.239.239.0/24 dev br-20f64b98bb95 scope link src 172.239.239.1
192.168.1.0/24 dev eth0 scope link src 192.168.1.188 metric 100
and here are the routes from Nimble:
10.114.104.0/25 dev eth1 proto kernel scope link src 10.114.104.2
172.239.239.0/24 dev eth0 proto kernel scope link src 172.239.239.10
How do I make the IP subnet reachable from the other container?
From the routes you shared I imagine you are using network_mode: host on your NetworkManager container, whereas your Nimble container is using a bridged network, thus it cannot reach the interfaces on the host. The solution would be to set network_mode: host on your Nimble container and then both containers will be able to communicate.
Otherwise if you don’t want to do that you could maybe tell us more about the reasons the application you are trying to setup. It may be sufficient to expose a port from the Nimble container to have external hosts to reach it
Could you provide more details on how the different elements interact? Where is the camera server? On the device or on another host? Why does the Nimble container need to access the NetworkManager service?
To clarify on my previous answer, the Nimble container should be able to access external network addresses and external hosts should be able to access the exposed ports by the Nimble container, so you only need to set network_mode: host if you want direct communication between the containers.
Previously we had our devices connected to a network via ethernet that also has multiple ip cameras connected to it. Then, our device could access the streams from those other cameras. Now, we are trying to connect to a WiFi doorbell. Our current process is to enable a WiFi hotspot in the NM and then have the doorbell connect to it. This should allow us to access the stream from Nimble but it is not working at the moment. The network manager is responsible for managing the network interfaces and creating the hotspot. The nimble agent service is used for all video processing (streaming and recording). This interface is fully functional with any wired camera but it currently not seeing the WiFi doorbell.
I see, I think you should be able to access the 10.42.0.0/24 from the Nimble container since the NetworkManager container sets the network configuration host wide. Can you ping the WiFi doorbell IP address from your Nimble container? How about the NetworkManager container? Can you ping 10.42.0.1 from the Nimble container?
Hi, can you check if you’re able to reach the camera ip from the hostOS? One easy way to do this would be to run the Nimble container with network_mode: host as well. This way we can rule out that it’s something related to container networking…
Hi, were you able to solve the issue? I read the thread, but the network topology you have there is not very clearly explained. I see you are adding iptable rules between wlan0 and eth0. Are you trying to connect one device that is on eth0 to another one that is an access point client on wlan0 through the main balena device above? Please provide as much information as possible, so that I may give you some guidance on how to approach this.