EG Information

Main Index
EG Manual
Disclaimer
Legal Information
Hall of Fame
Hall of Shame
Member Rankings
Members List
Meet the Staff
Hacker's Home Page
IRC Flash Chat

Training Missions

Read Me First
Basic Skills
Realistic Scenarios
Cryptography
Software Cracking
Linux ELF Binary Cracking
Logical Thinking
Programming
Captcha Cracking
Patching
Steganography
Deface This Wall
/dev/null
/dev/urandom
/dev/extra

Knowledge Bank

Discussion Forums
Exploit Database
PasteBin
RSS Feeds RSS
Articles / Tutorials
Videos
Online EG MP3 Player Radio
Downloads
Tools

Code Resources

Submit Code
Ajax
ASM
Bash
C
CPP
Csharp
Delphi
Haskell
Java
Javascript
Jython
Lisp
mIRC
MySQL
Perl
PHP
Python
QBASIC
VisualBasic

Pimp Us Out!

Review enigmagroup.org on alexa.com

Has Enigma Group Helped You? Then Help Us By Advertising For Us. Place One Of The Following Images On Your Site And Create A Link Back To Enigma Group.

Enigma Group

Enigma Group

Enigma Group

Enigma Group
 

Enigma Group's Articles



Return to Category Selection

Setting up a reverse SSH tunnel - Submitted By: Ausome1 2008-08-19 10:54:53
Takeaway:
Learn to forward a port on a remote machine to a local machine while initiating the SSH tunnel from the local machine.

SSH is an extremely useful tool in that it allows you to do many things in a secure fashion that you might not otherwise be able to do. One of the things SSH allows you to do is to set up a reverse encrypted tunnel for data transfer. Typically, when you initiate an SSH tunnel, you forward a port on the local machine to a remote machine which can allow you to connect to an insecure service in a secure way, such as POP3 or IMAP. However, you can also do the reverse. You can forward a port on the remote machine to the local machine while still initiating the tunnel from the local machine.

This is useful if you have a service on the remote end that you want to have connected to something on the local machine, but you don't wish to open up your firewall or have SSH private keys stored on the remote machine. By using a reverse tunnel, you maintain all of the control on the local machine. An example usage for this would be for logging messages; by setting up a reverse SSH tunnel, you can have a logger on the remote system send logs to the local system (i.e., syslog-ng).

To set up the reverse tunnel, use:

<code>
$ ssh -nNT -R 1100:local.mydomain.com:1100 remote.mydomain.com
</code>

What this does is initiate a connection to remote.mydomain.com and forwards TCP port 1100 on remote.mydomain.com to TCP port 1100 on local.mydomain.com. The "-n" option tells ssh to associate standard input with /dev/null, "-N" tells ssh to just set up the tunnel and not to prepare a command stream, and "-T" tells ssh not to allocate a pseudo-tty on the remote system. These options are useful because all that is desired is the tunnel and no actual commands will be sent through the tunnel, unlike a normal SSH login session. The "-R" option tells ssh to set up the tunnel as a reverse tunnel.

Now, if anything connects to port 1100 on the remote system, it will be transparently forwarded to port 1100 on the local system.

Return to Category Selection
If you wish to submit a comment, you must be a registered member and logged in.

Login or Register.



Return to Category Selection

 

Who Visited EnigmaGroup Today?

2245 Guests, 177 Users (193 Spiders)
Quakximator, HansWurst123, Schwuchtelini, GhostInAShell, DarkSIDE, Los Conquistador, VeryCreativeName, amone, pollolololo, philipp_lukas, kr1shn4murt1, pr1nc1p1um, kill0rz, theshady, Yoreleviv, chicane, cjconstante, kdd225, tcnet, ayoubouni95, Rakybrabe, Edotdl, ajohe, EGHF, 3sp4rt4c0, NaxasNarat, Assassin, maxuris, busyr, KC-Cracky, SoEinTyp_1, Nightraven, thefiberlab, NoboThatHobo, seba1234, Xato18, voodoomaster, schrabbel123, King_Marv, asd0l, sylar8831, M0dulator, hieubg, Heise, gh7531, PhytonNet, aton1961, tomecki, faiz77, subber22, negasora, LlinksRechts, HermanFer, Tyrouh, AnoX, kikoWicked, Gregsen, fmuvaweh81, befreebeopen, Buck Ingham, Corluk, Dablus, itsukiminami2, German2fire, fadocs, Hamster, kuteminh11, terminator3456, IR61, DipSwitch, RichardSl, m3rc1fulcameron, Aceofsquares, khoaha143, jack, vipininfosec, romans134, Racoon, helghost, cve916, CmDisco, MYros27, ayubx, ellisp, nueb, cyberwolf, DigitalMaphia, N8stayler, Nastradamus, Evil1, jmmagee, HackStuff, lynnata, Ryuske, jellyfish, cor3dump, LiesHidden, coyote86, nofriggenway, leatherface, zombiesloth, santiagom, grws, BlackHatter14, new2hacking, KaqqBooN, zlock, noeggr, Emreizfame0385, okamiparadox, mordboy23, alejocr7sr, Gille, Verrain, Daved1058, nigrum2332, Legion_the_Destroyer, MrKarbrador, Sinthoras, ZepSung, DeathbyProxy, pickel836, Halfi, Flake, c0re, MightyEvil, max1094, Steve, Cyb3r h4ck3r, Brieferbox, Anonanonamous, poochlooker, Alpha Et Omega, Kamigawa, newbienoob, LBPFR34K, Plegerz, SonicD007, emilymae_11, DJPhonics95, GalacticHero, dyvynr, zeph, MightShadow, syst3mf4ilur3, kernel_mod, weaponX, Thopajo, lynx, cdubbs, shanuthegreat, s_well_j, Torben545, gravesman, shiva1, msmall1972, RollinHatin, icestabilo, magmed, Chaqye, milsnitte, Elias_Wechner, katasan, Antagonist94, clone05, willikynah, jtong, jclaessens97, aloksaini, jeph, henje, orfeus, easypeasy, HST, zeehirmann, jaberdaberduu, Ausome1
 
Enigma Group