Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. Expose reverse-SSH tunnel to Cloudron app?

Expose reverse-SSH tunnel to Cloudron app?

Scheduled Pinned Locked Moved Unsolved Support
3 Posts 3 Posters 79 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jorrg
    wrote last edited by
    #1

    Hi all,

    Need a quick hint:

    # MacBook → Cloudron box (works)
    ssh -R 172.18.0.1:11434:localhost:11434 <user>@<server>
    
    # On the Cloudron host (works)
    curl localhost:11434          # → “Ollama is running”
    
    # Inside my Cloudron app (times out)
    cloudron exec --app <app> -- curl 172.18.0.1:11434
    

    Goal: let the app reach Ollama on my Mac via that tunnel.
    Host sees it, container doesn’t. What’s the right bind/IP/firewall tweak so the container can hit the tunnel?

    Thanks!

    fbartelsF 1 Reply Last reply
    1
    • J jorrg

      Hi all,

      Need a quick hint:

      # MacBook → Cloudron box (works)
      ssh -R 172.18.0.1:11434:localhost:11434 <user>@<server>
      
      # On the Cloudron host (works)
      curl localhost:11434          # → “Ollama is running”
      
      # Inside my Cloudron app (times out)
      cloudron exec --app <app> -- curl 172.18.0.1:11434
      

      Goal: let the app reach Ollama on my Mac via that tunnel.
      Host sees it, container doesn’t. What’s the right bind/IP/firewall tweak so the container can hit the tunnel?

      Thanks!

      fbartelsF Offline
      fbartelsF Offline
      fbartels
      App Dev
      wrote last edited by
      #2

      @jorrg said in Expose reverse-SSH tunnel to Cloudron app?:

      :localhost:11434

      By binding the port to localhost it is available to the Cloudron host, but the apps which are running in containers on a separate network cannot reach it.

      You need to bin them to a global IP (and then firewall it so no others can access it).

      1 Reply Last reply
      3
      • J Offline
        J Offline
        joseph
        Staff
        wrote last edited by joseph
        #3

        In sshd, you should have GatewayPorts yes .

        If you whitelist the port 11434 as per https://docs.cloudron.io/networking/#whitelist-ports , it should work . I tested this and it works with your commands.

        But, I don't completely understand it. I found that 11434 also gets open to the world 🤔 In your example, curl localhost:11434 works.. why? aren't we just binding to 172.18.0.1 ?

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Bookmarks
        • Search