Few days back, i was asked by one of my friend about "ssh tunneling" which he encountered while surfing on net. But neither i nor any of my friends around were having any idea about "ssh tunneling". Then i worked on this topic using my best friend on web(ofcourse Google) and finally arrived at this article which focusses on all aspects of ssh tunneling. I found this concept very useful to bypass firewall restrictions and thought could help you guys in your work. Hence, i added this article in HaCkInG N CrAcKiNg Tips. Just keep checking because i will be adding one more article on ssh tunneling (with pictures).
Update: You can check out the second tutorial on ssh tunneling here.
First of all you should notice that it may be illegal to tunnel your corporate, college, university firewall or whatever so you're doing this on your own risk I am in no way responsible for your actions!
Example:
You are behind a firewall which limits "irc.xyz.org:9999" out *it's the ssl port of the xyz-irc* so you need to tunnel the firewall. In most cases port 80-outbound-connections are allowed so lets focus on this one.
There are many different methods to tunnel the firewall "findnot.com, loophole-server, ssl-http-tunneling with own or free tools and so on... google it* but i will get on SSH-Tunneling cause it's free and usual secure.
First of all you need a SSH-Server running on Port 80 in the internet. There are free SSH-Servers for LINUX, UNIX, Mac OSX, Windows ... google it you will find em... for Win-Users i suggest using the one coming with cygwin cause it is the one from LINUX.
If you don't own a box ask a friend or something like that to set one up for you... in many cases there are some boxes on which students have ssh-accounts so try to use your ssh-account to tunnel through it. *notice for this in most cases port 22-outbound connections must be allowed cause its the SSH-standard-port.
So, now what we do is making a SSH-Tunnel which runs a SOCKS-5-Proxy locally so we can tunnel EVERY application through it. Eeven the ones without SOCKS-support can be tunneled through if you use tools like SOCKSCap, FreeCAP, PermeoSecurity-Driver or for LINUX --> TSOCKS *google them you will find them.
Under Linux you can simply set up a local SOCKS-5 with the standart SSH-Client if you are typing the following command:
[CODE]
root@5[root]# ssh -D 1080 -l root -p 80 yoursshservername.com
Let me explain this for *NiX-newbs...
-D sets up the dynamic-local-listening port (1080) it's where you direct your Browser, IRC-Client or whatever to.
-l root <-- thats the user you are logging in with... needn't to be root can also be a normal user with the privilegdes to log in via ssh. -p 80 <-- in our special case the SSH-Server runs on port 80 *to tunnel the wall* so we need to connect to port 80*sounds logic doesn't it?* yoursshservername.com <-- it's the server in the net where you SSH-Server runs... So, now after you are connected to the SSH-Server it asks you if you want to accept it's cipher-key ... of course yes in here. Feel happy you now have a SSH-Tunnel. So now start your X-Chat *just example plz don't tell me X-Chat is not 1337 * and go to [settings]->[options]->[network-setup]
In here put in as a hostname: 127.0.0.1 and as port: 1080 than choose type: SOCKS-5
After successfully done this connect to the xyz irc via /server -ssl irc.xyz.gov 9999 and feel happy cause you tunneled the firewall successfully.
There are tools to do this more simple e.g.:
For Windows the free SSH-Tunnel which can be found here: http://dlmirror.rs4u.com/SSHTunnelSetup.exe
Docs are here : http://www.rs4u.com/SSHTunnel/
If you understood the principle behind the technique there should be no prob to use these to user-friendly tools to make tunnels... they are well documented so i hope that you will be able to do all hack or tunneling of your own by using this ssh tunneling tutorial article.
Happy Tunneling.
Enjoy HaCkInG.....