Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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


share|improve this question
up vote 1 down vote accepted

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.

share|improve this answer
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 – Keet Sep 22 '09 at 23:51

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.

share|improve this answer
considered of course... – Keet Sep 19 '09 at 0:37
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'... – user1797 Sep 19 '09 at 1:45
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. – sybreon Sep 21 '09 at 2:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.