Sunday, January 16, 2011

Tunnel web request via ssh

Hello, I am looking to give access a website which is blocked outside this country, to a friend who is located outside the county. I have a linux box here inside the county.

i have a user set up on the local box bob here is the setup so far, the remote user has put xx.xx.xx.xx:4444 in as their proxy in their broswer.

What I am looking for the correct ssh command which when run on the local box, will listen for traffic on port 4444 and forward the resquests on.

I have tried this but it return blank pages: ssh bob@localhost -g -D 1900

thanks in advance

.k

  • Using ssh for this only makes sense if they're opening the ssh session from their end. That would create a proxy on their box that would exit from your box, inside the country. This works great with putty on Windows as well as with normal *nix ssh clients.

    It would work like this:

    1. On their box, they would run ssh -D 4444 yourserver.
    2. Then they would configure their web browser to point to "localhost:4444" as the proxy server.
    3. The local ssh client would accept the proxy request, forward it through the ssh tunnel to your server, where it would exit out to the internet.

    If, however, you just want to set up a proxy server on your box that they can connect to directly from their browser (by configuring your box as the proxy server) then you want something like squid.

    Keet : Thanks for the reply, Just for the record, this is possible, opening the ssh at the server end.[This was for a short time, and I am sure it would be dodgy to leave it open for longer.] running 'ssh bob@localhost -g -D 4444' on the server box, and setting the remote users browser to use socks proxy to the server box ip, port 4444 worked ok. .k
    From Insyte
  • You should also consider the implication of your actions. There is probably a reason why things are blocked in their country. You may want to consider what happens if they are discovered by their government, trying to circumvent controls. With great power comes great responsibility.

    Keet : considered of course...
    David Collantes : Yet, your advise was uncalled, and not technically related at all. Let's stick to what's asked and not pretend we are 'dad', or 'mom'...
    sybreon : Although not technical, I still feel that it is fair advice. If the OP had already considered it, fine and well. But if not, it should be something to consider, aside from the mere technical issues.
    From sybreon
  • Opps sorry, This was workingn all along, just a dumb mistake by me,

    thanks anyway .k

    From Keet

0 comments:

Post a Comment