redir and ssh forwarding

Here’s the situation:

You have a machine called skull that has access to the internet.  However, no one can come into skull from the outside.

You also have a machine that is on a private network with skull called bones.

Finally, you have a third machine out on the internet named benincosa.com that you want to have access bones.

To make this happen, you use an SSH backdoor plus redir to set it up.  Here’s how its done:

1.  Download redir.  I get it for RHEL5 here:

http://rpmfind.net//linux/RPM/epel/5/x86_64/redir-2.2.1-5.el5.x86_64.html

For other OS:

http://rpmfind.net/linux/rpm2html/search.php?query=redir

2.  On skull:  ssh -R 2222:localhost:22 benincosa.com

3.  On skull:  redir –lport=2222 –cport=22 –caddr=bones

4.  Now from anywhere:  ssh -p 2222 benincosa.com and enter the passwd for bones and you will magically find yourself on bones.

That is how it is done my friends.

Another case:

from internal firewall machine:

ssh -R 2222:localhost:22 vallard@benincosa.com

On Benincosa.org run:

redir –lport=2223 –cport=2222 –caddr=127.0.0.1

Comments are closed.