Balena tunnel does not forward port

My device is running a development-image of BalenaOS.
I can see my webapp running when I navigate to http://<deviceuid>.local/ inside the browser.
Also when I SSH to the HostOS and check my running containers with balena ps I see it has one container exposing like such>3000/tcp.

However when I run the balena tunnel <full deviceuid> -p 80:8080 command it does not forward the port and I cannot reach the webapp via browser on 8080.

It just prompts that it’s ‘waiting for connection’.

Fetching application by name 6b35227b44c7d080a69158082d1587db (string)
[Debug]   Application not found
[Debug]   Fetching device by UUID 6b35227b44c7d080a69158082d1587db (string)
[Info]    Opening a tunnel to 6b35227b44c7d080a69158082d1587db...
[Info]     - tunnelling localhost:8080 to 6b35227b44c7d080a69158082d1587db:80
[Info]    Waiting for connections...

And after a minute or so the following => ===> :: connect ETIMEDOUT
[Error]   :0 => undefined:undefined ===> :: connect ETIMEDOUT
[Error]   :0 => undefined:undefined ===> :: connect ETIMEDOUT
[Error] => ===> :: connect ETIMEDOUT
[Error]   :0 => undefined:undefined ===> :: connect ETIMEDOUT

I tried it with other ports like 22222 to gain SSH access via the tunnel but no result.

Hi, I’ll try this on my local device. Which version of balenaos does the device use?

I am using balenaOS 2.44.0+rev3.
My cli is v11.17.3-windows-x64.

I tested locally with repo. Changed the port in server.js to listen to 3000 and added docker-compose.yml that looks like this:

version: '2.1'
      context: .
      - '80:3000'

Then I run balena tunnel <full deviceuid> -p 80:8080 and was able to access the website on http://localhost:8080/.
Can you ensure that you are logged in balena-cli with same credentials which you are logged in dashboard?
Also, can you run same steps as I did and see if it works?

I am using open-balena and don’t have access to any dashboard as far as I know. I logged with balena login and used my ‘super-user’ credentials. Is balena tunnel not working for open-balena maybe?

Sorry, did not notice you were talking about openBalena. balena tunnel should work with openBalena. CLI is unable to connect to the port 3128 on your openBalena instance IP. Can you check your network/firewall config?

Awesome, that indeed resolved the issue and in hindsight it was quite obvious.
Maybe forwarding port 3128 is something worth mentioning on the getting-started page.

Thanks karaxuna!