Possible to run flask web app on linux server without web access and access through tunnel?
<p>I work on a linux cluster that is behind a firewall. It does not have web access.</p>

<p>I had this idea I could try to run flask and direct it to a port I know is open (5901 for vnc), and then tunnel that port and view it in my browser.</p>

<p>It's not working so far. Is this possible at all?</p>

<p>Here is what I'm doing:</p>

<p><strong>helloflask.py</strong>  </p>

<pre><code>from flask import Flask
app = Flask(__name__)

@app.route("/")
def hello():
    return "Hello World!"

    if __name__ == "__main__":
        app.run(host='0.0.0.0', port=5901)
        #app.run()
</code></pre>

<p>I run <code>python helloflask.py</code> then</p>

<pre><code>ssh -L 5901:&lt;inner server&gt;:5901 &lt;outer server&gt;
</code></pre>

<p>Then I navigate to <code>localhost:5901</code>. Nothing. I also tried <code>links localhost:5901</code> and <code>links &lt;server&gt;:5901</code>, but again nothing.</p>

<p>Is it possible there is some way to do this?</p>