How To use a server as proxy

Have the feeling that everybody is staring at you in the other forums? Then look here, in this forum nobody does care what you say ;-)

Moderator: Project members

Post Reply
Message
Author
scubindu

How To use a server as proxy

#1 Post by scubindu » 2015-06-26 05:05

Hello everybody.

I want to use a server I have as a SOCKS proxy for browsing from my laptop.
According to OpenSSH's man page, you can do that with the opcion -D

-D port
Specifies a local ``dynamic'' application-level port forwarding. This works by allocating a socket to listen to port on the local side, and whenever a connection is made to this port, the connection is forwarded over the secure channel, and the application protocol is then used to determine where to connect to from the remote machine. Currently the SOCKS4 and SOCKS5 protocols are supported, and ssh will act as a SOCKS server. Only root can forward privileged ports. Dynamic port forwardings can also be specified in the configuration file.
So in my server (IP 192.168.0.5) I typed the command:
ssh localhost -D3333
(an SSH connection to itself)

That should make it listen on port 3333.
Then I configured my browser to use the SOCKS proxy 192.168.0.5:3333

However it doesn't seem to work, the browser says it couldn't establish the connection.

What am I doing wrong?
Can this be done with OpenSSH?
Last edited by scubindu on 2015-06-27 11:40, edited 2 times in total.

User avatar
botg
Site Admin
Posts: 35507
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: How To use a server as proxy

#2 Post by botg » 2015-06-26 06:29

By default the dynamic port listens on localhost only, otherwise it would be an open proxy. There should be an option to change the binding. However: Do not run open proxies unless you can deal with the legal consequences.

Post Reply