Just to say I don’t condone by passing firewalls but if needs must to get a job done heres how.

So we’ve all worked in places with restrictive firewalls that make our life as admins difficult. Its easy enough to tunnel out of most firewalls if you have a SSH server on the outside you can even set it to run on port 443 if you can’t get out on 22, you can then use a dynamic tunnel using the -D flag for SSH to bounce outside the restrictions. But what if you need to do something a bit extra? What if you need to access your desktop machine from outside of your network but the VPN solution your company supplies doesn’t deliver? Well SSH can be your friend here too. Reverse SSH tunnels are going to get you right into the heart of the corporate network and probably expose how lax the security really is where you work ;) but hey if you’ve got a job to do this will just let you get on with it.

Firstly you’re going to need to initiate this from your corporate desktop in advance, you’re also going to need a “jump box” ssh server you can hit ont he internet, and finally you’ll need your local desktop.

From your corporate machine you need ssh running as a service here also then you need to make a SSH connection out to your jump box but allow connections back in down that SSH connection you’ve just opened. Its easier than it sounds:

On the corporate machine:

ssh -R 2100:localhost:22 <USER>@<YOUR_JUMP_BOX>

This opens an SSH connection to you jump box and sets up port 2100 on the jump box to forward back down the tunnel to your corporate machine on port 22.

Now for the funky stuff. You want to use your local desktop browser to surf the web but appear as if you are in the office IP range. So lets first connect to the jump box from the local desktop and open a new normal SSH tunnel:

On your local desktop outside the network:

ssh -L 8080:127.0.0.1:2101 <USER>@<YOUR_JUMP_BOX>

Don’t worry if you get erros like the following, its purely because we haven’t connected the two tunnels to each other:

channel 3: open failed: connect failed: Connection refused
channel 4: open failed: connect failed: Connection refused

Ok now time to connect to two SSH tunnels together. On your newly created SSH connection as shown above type the following in to the shell of the jump box:

On the jump box:

ssh -p 2100 -D 2101 localhost

This not only joins your dynamic tunnel to your reverse tunnel and ssh’s into the corporate machine but also allows HTTP traffic to flow between the local desktop and corporate machine using a socks proxy! Your local desktop forward traffic on port 8080 to the jump box which in turn forwards it to the jump box (localhost) onto port 2101. Now port 2101 is forwarded down the reverse tunnel to your corporate machine and you can browse the web.

Now all thats left to do is tell your browser on your local desktop to use a proxy and the details will be localhost port 8080 and the type is socks 5. Now you can browse the web as if you’re in the office and access local intranets but also you have a shell open to your desktop to do some work that can be only completed from inside.

I hope you all find this useful, and no doubt you’ll be able to forward all kind sof traffic in a simular way!

by-nc
, , , ,

Hi all,

Just a quick post to announce the availability of a nodeJS PPA repository for Ubuntu 12.04. This PPA currently supports nodeJS 0.6.11 and npm 1.1.1-7 but I’ll be aiming to update as the new stable releases come out. Hopefully this will enable more of you to work with the current stable release of nodeJS instead of the ubuntu/debian default which at the time of writing is on the 0.4.x branch.

You can read more about the repository here:

https://launchpad.net/~richarvey/+archive/nodejs

or easily add the repo by running this from the command prompt:

sudo add-apt-repository ppa:richarvey/nodejs

For those of you wishing to know more about nodejs hop on over to http://nodejs.org

by-nc
, , ,

Just a quick post to tell you how to get hybridfox 1.7 (for connecting to AWS or eucalyptus/UEC clouds) working with the Firefox 5.0. Firstly download the 1.7 version of the plugin and save it to disk. This will give you an XPI file.

http://code.google.com/p/hybridfox/

Now rename the file you’ve downloaded from .xpi to .zip and then extract the .zip file. The file you need to edit is called install.rdf just open this file in you favourite text editor. You’re looking for a line that says:

<em:maxVersion>4.2</em:maxVersion>

and you need to change it to:

<em:maxVersion>5.*</em:maxVersion>

Now zip those files backup, and once done rename the .zip to .xpi. You should now be able to install hybridfox 1.7 in firefox by using the install from file method of adding a plugin.

Update!

Now Firefox 6 is due to land anytime soon I thought I’d update this post and let you know the same tweak can be done to make hybridfox work in Firefox 6. Just change the maxVersion to 6 of course!

<em:maxVersion>6.*</em:maxVersion>

Just for reference I’m using the hybridfox-1.7.000089.xpi version of the plugin.

 

by-nc
, , , , , ,
You are protected by wp-dephorm:
Private