James G. Sack (jim) wrote: > 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). > > The fix is to use a wget option > wget --header='remotehost.net' http://localhost:8888/ > This works fine for wget. > > 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? >
Sorry, I had the header parm wrong. It should have been wget --header='Host: remotehost.net' http://localhost:8888/ Regards, ..jim -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list
