begin  quoting James G. Sack (jim) as of Fri, Aug 01, 2008 at 12:19:59AM -0700:
> Playing around with ssh tunneling today, using a pattern like
>  ssh -L8888:remotehost.net:80 localhost
> 
> and then from another terminal trying
>  wget http://localhost:8888/
> 
> I discovered that some hosts return 404 (not found), evidently because
> the request contains a header like
>  Host: localhost:8888
> 
> Not all hosts are that fussy, eg google isn't. Maybe it's only common on
> VirtualHost servers (as was the one I tried).

That's because that "Host:" line is how the webserver determines which
virtual host you're asking for.

[snip]
> I guess for a browser, you'd need another intermediary acting similar to
> wget with the header rewrite trick? Along the lines of a
> single-destination proxy, or some language like that?

There are firefox extensions that claim to give you control over all of
the headers.

Setting up a proxy on the far end of the tunnel and telling ssh to use
the local end of the tunnel as a proxy *ought* to do the trick. Those
who play with this sort of thing routinely could probably even tell you
what tools to start looking at.

-- 
Middle of the night and sick... hey, why not offer advice?
Stewart Stremler


-- 
KPLUG-List@kernel-panic.org
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to