Forward Public Device URL to web interface IP-camera

Hi,

I would like to reach the web interface of a IP camera connected to my device by means of the Public Device URL. What’s best practice to forward port 80 towards this IP?

Thanks in advance,
Willem

Hello @remsol,

On balenaCloud dashboard, if you enable the DEVICE PUBLIC URL, that device will then be accessible via port 80 from the URL created.

Let me know if this answers your question,

Cheers

Hi @dansku,

I have found the setting in the dashboard. However, I’m not familiar on how to forward the port to the specific local IP of the camera.

Hey @remsol,

Could you give me a bit more context about what you are trying to do, which device are you running?

For example, in case you are running a multi-container application, you can forward the port 80 to that container by adding

    expose:
        - "80"

To the docker-compose.yml file. For more info you can check https://www.balena.io/docs/learn/develop/multicontainer/#docker-composeyml-file

Cheers

Hi @dansku,

I’m using the Raspberry Pi 3 with BalanaOS to get familiar with Balana by pushing some example projects, so far so good.

Now I’ve connected an IP camera directly to the ethernet port of the Pi and I’m able to ping the device from the Host OS. The device is using the wifi interface for connection to BalenaOS. Now I would like to use the Public URL to access the web interface of the camera. Probably there are multiple ways to solve this but I was curious about best practices. Do I need a separate container or is it something I could do easily in Host OS?

Hi @remsol

You can use the Host OS for testing/experimentation purposes but ultimately you should configure a container to carry out the task of forwarding the traffic.

For tunnelling you could use netcat with something like the following: nc -v -lk -p 80 -e /usr/bin/nc DEVICE_IP DEVICE_PORT

There’s a clear listing of what all the options do here: https://www.computerhope.com/unix/nc.htm

Bear in mind though that bandwidth usage through the public URL system will become chargeable soon so using it in a production scenario for streaming real time video is likely to incur a charge in the future. Depending on the protocol your camera uses for streaming this method may not work at all but we’d be interested to know how you get on.

I do not see nc command having these options.
root@e8dd911:~# nc
BusyBox v1.30.1 (2019-08-08 14:25:50 UTC) multi-call binary.

Usage: nc [IPADDR PORT]

Hi @mbedare, I see you already created a thread here where we answered just now, so let’s reference that to keep it simple :smiley: