DarkMatter in Cyberspace
  • Home
  • Categories
  • Tags
  • Archives

Penetrate GFW with SSH tunnels


Setup

  1. Get a free ssh account. I use CJB.NET;

  2. Connect my cjb.net account with putty:

    Session: ip: 216.194.70.6 ("shell.cjb.net" is polluted by gfw, but its ip still work), port: 443;

    Connection -> Data: Auto-login username: myusername; Auto-login password: mypwd(item "password" only appear in kitty, if using putty you have to input password mannually at runtime);

    Connection -> SSH -> Tunnels: Source port(the proxy port for browser): 7070, leave "Destination" blank and select "Dynamic", then press "Add", like the following:

  3. press "Open" to connect to shell.cjb.net. you can verify the connection by the following:

D:\Apps\ConEmu>netstat -ano|findstr 7070 TCP 127.0.0.1:7070 0.0.0.0:0 LISTENING 11088 TCP 127.0.0.1:7070 127.0.0.1:56477 ESTABLISHED 11088 TCP 127.0.0.1:7070 127.0.0.1:56528 ESTABLISHED 11088 TCP 127.0.0.1:56477 127.0.0.1:7070 ESTABLISHED 10348 TCP 127.0.0.1:56528 127.0.0.1:7070 ESTABLISHED 10348

  1. open firefox, input "about:config" in address bar, modify the value of "network.proxy.socks_remote_dns" to "true", and set proxy as Host: 127.0.0.1, Port: 7070, SOCKS v5, like the following:

Usage

  1. Define the above connection to cjb.net as "CJB" in kitty_portable;

  2. in hotkeyDefs.ahk add a hotstring:

::ccjb::d:\apps\Kitty\kitty_portable.exe -load CJB

  1. open a console and type: ccjb, you will see the following if login cjb successfully:

Using username "leechau". leechau@216.194.70.6's password: Send automatic password Last login: Tue Jan 8 20:44:05 2013 from 114.247.236.194 Welcome to the CJB.NET shell server! ... [leechau@shell ~]$

  1. Open your firefox and enjoy your journey on facebook and twitter :)


Published

Jan 8, 2013

Last Updated

Jan 8, 2013

Category

Tech

Tags

  • gfw 3
  • ssh 23

Contact

  • Powered by Pelican. Theme: Elegant by Talha Mansoor