title: Expose API using other server and SSH tunnel
body: <p>I have been trying to solve this for a couple of days and don't seem to find a way to do it. I have a raspberry pi in my local network which is running jupyter (port 8888) and a flask api (port 5000). I want to be able to access it remotely using another server. My setup and what I have until now is:</p>
  <p>Server in GCP with static IP (let's say it's gcp.static.ip). I opened the ports 7003 and 7004 as udp.</p>
  <p>Raspberry Pi in my home network with dynamic IP (can't have static IP) and jupyter and flask api on ports 8888 and 5000. I forwarded the ports with:</p>
  <pre><code>ssh -NR 7003:localhost:5000 -R 7004:localhost:88888 user@gcp.static.ip
  </code></pre>
  <p>Laptop in remote network. If I do the following ssh tunnel I can access the jupyter server at localhost:7004:</p>
  <pre><code>ssh -NL 7004:localhost:7004 user@gcp.static.ip
  </code></pre>
  <p>I can't seem to do the same for the flask API. If I ssh into the gcp server I can query the API at port 7003. How can I set the gcp server so that I can query the api with gcp.static.ip:APIPort and access jupyter in gcp.static.ip:JupyterPort.</p>
  <p>Thanks a lot!</p>
  <p>UPDATE: I'm able to query the api forwarding a TCP port. However, still want to know if this is possible without having to create another tunnel on my lapto.</p>