Quantcast

Jump to content


Photo

[Guide] SSH Tunneling - Kiss those free proxies goodbye!


  • Please log in to reply
7 replies to this topic

#1 GetJinxed

GetJinxed
  • Reckless Cheater


  • 1,394 posts


Users Awards

Posted 29 September 2015 - 10:46 AM

How an SSH Tunnel Works

 

 

SSH, which stands for “secure shell,” isn’t designed solely for forwarding network traffic. Generally, SSH is used to securely acquire and use a remote terminal session. SSH also uses strong encryption, and you can set your SSH client to act as a SOCKS proxy. Once you have, you can configure applications on your computer – such as your web browser – to use the SOCKS proxy. The traffic enters the SOCKS proxy running on your local system and the SSH client forwards it through the SSH connection – this is known as SSH tunneling. This works similarly to browsing the web over a VPN – from the web server’s perspective, your traffic appears to be coming from the SSH server. The traffic between your computer and the SSH server is encrypted, so you can browse over an encrypted connection as you could with a VPN.

(Googled some explanation  :rolleyes:  Brief explanation below)

 

tl;dr. You can use the server's ip as a proxy. Since you're paying for it you will always have that IP address.

Can be useful if you're IP banned like me and don't want to use those free proxies that keep dying. Also you can keep the account secure since it's always logging in from one single IP address.

 

 

Things needed:

Putty

Firefox Browser

A Hosting/VPS/Dedicated Server

 

I didn't post any "cheap" companies because i'm not quite sure I'd be breaking any Neocodex's rules. I've contacted some really cheap VPS provider that only charges 3-4$ a year for a really low specs VPS. Which if you use them to access Neopets or some other sites by SSH Tunneling should be more than enough. Link of a ticket i sent them : http://i.imgur.com/Jjo2hEd.png

 

If you have some shared hosting you might be able to use that IP. I know for a fact that Hostgator unfortunately doesn't  :ohwell:  Unless you have a VPS package hosting. I didn't search deeper into this subject as I have a couple servers of mine so... I can help you finding some cheap ones if you wish  ;)

 

How it is done:

 

Open Putty

 

gHo8otV.png

 

Under Host Name (or IP Address) type in your server's IP

 

Then on the left side click on Connection -> SSH -> Tunnels

 

tBxwdT3.png

 

On the Source Port you can type anything such as 9870, 9090. Doesn't really matter as long as it's an unnused port.

Under Destination click on Dynamic (reffer to the image above)

Finally click Add

 

Then go back to the first screen we seen by clicking on "Session" (scroll up :) )

And finally hit "Open"

 

You'll be asked for a login. Well that's your server's login  :lol2:  Can't really help much there.

Once you've logged in

 

Open your Firefox and click Tools -> Options -> Advanced

yY395Dn.jpg

 

You'll see something like that and just click on "Settings"

 

Then configure your proxy settings like that:

 

firefox2.jpg

 

Make sure you're using the same port as you've used on Putty. In case it doesn't work you can try to use "localhost" (without quotes) instead of 127.0.0.1 . Either way it should work  :)

 

Stopping DNS Leaks

 

By default, even with a correctly configured SOCKS proxy set up in firefox there will be DNS information leakage when firefox looks up domain names.

To force domain names to be resolved remotely, avoiding this information leakage do the following:

RbLhypu.png

Go to the Firefox address bar and type in about:config and hit enter

Press "I'll be careful, I promise!" to dismiss the warning about changing settings

 

Type in "network.proxy.socks" to narrow down the available options

Double Click "network.proxy.socks_remote_dns" to change its value to "true"

 

yadOJ3M.png

 

Changes take effect immediately and you can now close the tab, secure in the knowledge that your DNS requests are not bypassing the SSH tunnel

 

Lastly you can check if your IP is in fact changed by using some IP checker website like : http://www.ip-adress.com/ip_tracer/

 



#2 kuwazome

kuwazome
  • 1,163 posts

Posted 02 April 2016 - 07:10 PM

You can use a program called Proxifier (standard edition, portable leaks traffic sometimes) to tunnel all traffic (system wide or program specific) through the same SOCKS proxy via ssh tunnel. This is the equivalent of sshuttle on Linux.



#3 GetJinxed

GetJinxed
  • Reckless Cheater


  • 1,394 posts


Users Awards

Posted 02 April 2016 - 07:13 PM

You can use a program called Proxifier (standard edition, portable leaks traffic sometimes) to tunnel all traffic (system wide or program specific) through the same SOCKS proxy via ssh tunnel. This is the equivalent of sshuttle on Linux.

 

Yeah exactly :p I never managed to get python programs to go through proxifier though :/ Have you ever tried?



#4 kuwazome

kuwazome
  • 1,163 posts

Posted 02 April 2016 - 07:18 PM

Yeah exactly :p I never managed to get python programs to go through proxifier though :/ Have you ever tried?

 

To be lazy just make a rule that tunnels all applications and ports through the putty SOCKS proxy in Proxifier and it'll work. I just setup a VM that only runs bots.

If youre referring to codex programs, the application isnt python because its an executable and not a script run through the python runtime compiler. The exe called preloader or something in the neocodex folder.



#5 GetJinxed

GetJinxed
  • Reckless Cheater


  • 1,394 posts


Users Awards

Posted 02 April 2016 - 07:20 PM

To be lazy just make a rule that tunnels all applications and ports through the putty SOCKS proxy in Proxifier and it'll work. I just setup a VM that only runs bots.

If youre referring to codex programs, the application isnt python because its an executable and not a script run through the python runtime compiler. The exe called preloader or something in the neocodex folder.

 

Oh yeah I forgot about the program manager. Does that one work too? Then i probably should just setup some VM and do what you just said :p



#6 kuwazome

kuwazome
  • 1,163 posts

Posted 02 April 2016 - 07:25 PM

Oh yeah I forgot about the program manager. Does that one work too? Then i probably should just setup some VM and do what you just said :p

 

Yes, if you force that exe through Proxifier, it will tunnel all traffic through the proxy.

Its convenient since traffic (including the sub-programs) inside the program manager will use the proxy, even the update traffic.

 

For non-executable python scripts, you have to add the python.exe (python2 or python3 depending on program) as a rule.

To be sure how to setup any program, just run Fiddler and then run your program normally and observe the traffic.

Once you figure out what to hook to, add it to Proxifier and observe again on fiddler.

 

Again, I prefer the VM method because you can just tunnel everything, including windows services and all dns requests.

Better to be safe imo.


Edited by kuwazome, 02 April 2016 - 07:25 PM.


#7 4RM4N1

4RM4N1
  • 15 posts

Posted 11 April 2016 - 05:01 PM

Pretty decent guide! Thanks for this.



#8 GetJinxed

GetJinxed
  • Reckless Cheater


  • 1,394 posts


Users Awards

Posted 12 April 2016 - 10:02 AM

Yw :) Thought nobody ever used it tbh. xD It's useful for me since  i'm ip banned from neopets :p




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users