title: Forward access to website behind firewall using SSH tunneling
body: <p>I found similar scenario <a href="https://stackoverflow.com/questions/19269385/how-to-bypass-firewall-and-nat-with-reverse-ssh-tunnel">in this topic</a> but it refers to ssh, and I need to forward access to webserver. </p>
  
  <p>How it looks like right now:</p>
  
  <p>[ <strong>private server</strong> ] - behind router and firewall, access via public ip unavailable</p>
  
  <p>[ <strong>middle server</strong> ] - public ip, ports open</p>
  
  <p>[ <strong>user</strong> ] - connecting via web browser to <strong>middle server</strong>, want's to get website from <strong>private server</strong></p>
  
  <p>What I've already done:</p>
  
  <pre><code>ssh -N -R 8888:localhost:80 root@[middle server ip]
  </code></pre>
  
  <p>Now I can access <strong>private server</strong> from <strong>middle server</strong> eg. via:</p>
  
  <pre><code>curl http://localhost:8888
  </code></pre>
  
  <p>So the tunnel is working ok.</p>
  
  <p>The problem is, when I (as <strong>user</strong>) enter [middle server ip]:8888, all I receive is <code>ERR_CONNECTION_REFUSED</code></p>
  
  <p>What am I missing? Some kind of port redirection? Any help would be appreciated!</p>