I want to use an SSH tunnel to work on a project, -L 8080:localhost:80
. When opening http://localhost:8080
on my local machine things work, but the server (MediaWiki) is putting a lot of http://203.0.113.37/
(example IP) in the HTML source served and this address does not go anywhere from my localhost.
Is there a way to map 203.0.113.37 to 127.0.0.1 on my local machine? E.g. something like /etc/hosts
but then for IP addresses.
(Ideally I want this to work on OS X.)
ssh -D 1080
instead of port forwarding and configure your browser to use a SOCKS proxy via localhost:1080 (all browser traffic will be routed via that ssh SOCKS tunnel).localhost:8080
, it would probably work. It would issue someGET http://203.0.113.37/... HTTP/1.1
... to the remote web server which it should treat properly.