HTTP Tunnels
Firewalls, of various forms, block access to internal machines.
A web server running on an internal machine is therefore protected
from external browsers. This can be an inconvenience and is
circumvented by directing the external browser to work through
a tunnel to a proxy machine.
(Browser)
---> localhost:1080 (http via socks)
---> localhost:* (ssh tunnel, client endpoint)
---> proxy_server:22 (ssh tunnel, server endpoint)
---> proxy_server:1080 (socks server, demux'd)
---> proxy_server:* (http client)
---> web_server:80 (http server)
Consider three machines,
- localhost
- the user's machine, w/ a socks enabled browser
- proxy_server
- the proxy_server, running sshd and socks and
accessible through the filewall
- web_server
- the targer server, running httpd, and behind the firewall
Do the following:
- Setup socks to permit the connection from proxy_host to web_server.
- Setup user's machine to tunnel port 1080 through ssh.
- Test the socks tunnel. Ssh to proxy_host and telnet to the socks
port:
You should not get a connection reject, although there isn't
much you can do with the connection using telnet text.
-
Configure U's browser to use socks. Eg: for Mozilla,
and apply.
-
Put the IP address of web-server as the URL in the browser on localhost
and go.
Generally, the raw IP will be required since the name my
be unresolvable from outside the firewall.