0

I have local computer and remote server. Remote server is isolated and is only accessible with this computer. I want to connect to site from server, let it be https://example.com/site

I tried to make a tunnel via ssh -R 6761:example.com:80 remote-server. But when I am trying to use wget http://localhost:6761/site on the remote server - it doesn't work and show 404 whilst wget http://example.com/site working well on local computer.

What I am doing wrong?

criztovyl
  • 761
  • 5
  • 21
Gleb
  • 59
  • 7

1 Answers1

0

You cannot tunnel HTTP that way.

The name of the server you are trying to reach will be included in the request (the Host header), but it will most likely only listen to example.com, not localhost.

You will need to set up a HTTP Proxy (Forward Proxy) on your local machine and tell your http client(s) to use that. (How depends on the client.)

criztovyl
  • 761
  • 5
  • 21