Difference between revisions of "Ssh tunnel - SOCKS proxy"

From Ever changing code
Jump to navigation Jump to search
Line 1: Line 1:
SSh to your server, <code>-D {port_number}</code> it creates ssh tunnel listening on your local host TCP '''port_number'''
Tunnelling over our Internet link it sounds already exiting, isn't it?. But how difficult is it? Do we need any complex and sophisticated configuration of hardware and software? Hmm.. it is not necessary even to involve ipsec or ssl stack to create VPN. SOCKS is built in to OpenSSH so it's trivial to run SOCKS proxy server with ssh client running with option -D. This option configures SSH client to listen on your local Linux box on specified by us tcp port. Then  we will use SOCKS5 proxy configuration built into most of Internet browsers to connect to.
 
[[File:Ssh-socks-proxy.png|Ssh-socks-proxy]]
 
First, SSh to your localhost server with <code>-D {port_number}</code>option. It creates ssh tunnel listening on your local host TCP '''port_number'''
  ssh -D 1080 username@your.server.com
  ssh -D 1080 username@your.server.com
Open Firefox > Options > Advanced > Network tab > Connection Settings... > Manual procy configuration > SOCKS Host: ''localhost'' Port: ''1080'' > OK
Open Firefox > Options > Advanced > Network tab > Connection Settings... > Manual procy configuration > SOCKS Host: ''localhost'' Port: ''1080'' > OK
[[File:Firefox-socks-proxy.png|none|300px|thumb|left|Firefox-socks-proxy]]
[[File:Firefox-socks-proxy.png|none|300px|thumb|left|Firefox-socks-proxy]]
Since now on you are using @your.server.com geo locations, what you can check at http://whatismyipaddress.com/ . It works with EC2 instances.
Since now on you are using @your.server.com geo locations, what you can check at http://whatismyipaddress.com/ . It works with Amazon EC2 instances.
[[Category:ssh]]
[[Category:ssh]]

Revision as of 23:04, 5 January 2014

Tunnelling over our Internet link it sounds already exiting, isn't it?. But how difficult is it? Do we need any complex and sophisticated configuration of hardware and software? Hmm.. it is not necessary even to involve ipsec or ssl stack to create VPN. SOCKS is built in to OpenSSH so it's trivial to run SOCKS proxy server with ssh client running with option -D. This option configures SSH client to listen on your local Linux box on specified by us tcp port. Then we will use SOCKS5 proxy configuration built into most of Internet browsers to connect to.

Ssh-socks-proxy

First, SSh to your localhost server with -D {port_number}option. It creates ssh tunnel listening on your local host TCP port_number

ssh -D 1080 username@your.server.com

Open Firefox > Options > Advanced > Network tab > Connection Settings... > Manual procy configuration > SOCKS Host: localhost Port: 1080 > OK

Firefox-socks-proxy

Since now on you are using @your.server.com geo locations, what you can check at http://whatismyipaddress.com/ . It works with Amazon EC2 instances.