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
  • Brite
  • 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 - Status | 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 Solved Support
4 Posts 4 Posters 916 Views 4 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 on 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 on 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 Online
        J Online
        joseph
        Staff
        wrote on 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
        • jamesJ Online
          jamesJ Online
          james
          Staff
          wrote on last edited by
          #4

          Marking this topic as solved since no more input was given from user @jorrg

          1 Reply Last reply
          0
          • jamesJ james has marked this topic as solved on

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          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