Setting up local SSH tunnelling.

0 replies. Asked on January 3, 2020 by Dane S
I'm having trouble getting tunnelling to work.

I've added my SSH key, and executing the remote forward command.

My local server is on http://localhost:3010

Nothing loads within the browserling website when I click on the tunnel hostname (eg, and I see this when I try it myself in the browser:

curl -vvv
* Trying
* Connected to ( port 57004 (#0)
> GET / HTTP/1.1
> Host:
> User-Agent: curl/7.64.1
> Accept: */*
< HTTP/1.1 301 Moved Permanently
< Content-Type: text/html
< Location: http://localhost:57004/
< Content-Length: 210
<!DOCTYPE html>
<html lang="en-US">
<head><title>301 Moved Permanently</title></head>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://localhost:57004/">here</a>.</p>
* Connection #0 to host left intact

The request doesn't actually reach my local app, and it seems to want to redirect to the remote port of the tunnel host, rather than the port of my local server.

If I send a Host header in my local curl request, it successfully connects to my local app:

curl -vvv -H "Host: localhost:3010"

...content from my app appears, and I see the request come to my local server...

Aren't I supposed to be able to make this request in the browser?
All answers
Please sign in to answer a question!